API Sellrapido


1. Caratteristiche Generali

1.1 URL Base

https://app.sellrapido.com/sr_company_ws


1.2 Autenticazione

Il sistema di autenticazione si basa sull’utilizzo di token JWT (JSON Web Token) per gestire in modo sicuro l’accesso alle risorse. Il flusso prevede l'utilizzo combinato di due tipi di token:

  • Access Token

    ha validità limitata (15 minuti); viene utilizzato per autenticare le richieste agli endpoint protetti tramite header HTTP

    Autorizzazione: Bearer <access_token>

  • Refresh Token

    ha validità estesa (30 giorni); consente sia di ottenere un nuovo access token sia per la rotazione del refresh token stesso (cioè ottenere un nuovo refresh token prima della scadenza) senza dover autenticare nuovamente l’utente

I token JWT non vengono salvati lato server: il sistema non mantiene alcuna copia persistente degli access token o refresh token emessi.

Per questo motivo, è responsabilità del cliente conservarli in modo sicuro e riservato.

Authorization

Effettua l’autenticazione iniziale del cliente tramite le credenziali username e password dell’account web, restituendo i token JWT.

Endpoint

POST /api/v2/auth/authorize

Header

  • Content-Type: application/json

Payload

{
  "username": "[username Sellrapido]"
  "password": "[passowrd Sellrapido]"
}
 

Risposta

Produces: application/json;charset=UTF-8, text/html; charset=utf-8

Struttura del payload di risposta

{

  "access_token": {

    "token": stringa, token di accesso. Usato in header Authorization per autenticare le richieste API. Durata 15 min.

    "expires_at": timestamp_ISO8601 (YYYY-MM-ddThh:mm:ssZ), data e ora di scadenza di questo token

    "type": "bearer", tipo di token. Di norma bearer

  },

  "refresh_token": {

    "token": stringa, token di refresh usato per aggiornare l’access_token e ruotare lo stesso refresh. Durata 30gg

    "expires_at": timestamp_ISO8601 (YYYY-MM-ddThh:mm:ssZ), data e ora di scadenza di questo token

    "type": "bearer", tipo di token. Di norma bearer

  }

}

Possibili codici di risposta

  • 200 OK – Autenticazione riuscita

  • 401 Unauthorized – non è stato possibile autenticare il cliente (il messaggio di errore fornisce la motivazione)

  • 403 Forbidden – il cliente non ha i permessi necessari per eseguire la chiamata

  • 500 Internal Server Error – Errore interno durante l’elaborazione

Esempi di messaggi di errore

  • Invalid credentials for {username}

  • Account not authorized

  • Subscription is not active

Renew Token

Consente di generare un nuovo access token a partire da un refresh token valido. I vecchi access token verranno invalidati anche se non ancora scaduti e quindi non saranno più utilizzabili.

Endpoint

POST /api/v2/auth/token

Header

  • Content-Type: application/json

Payload

{
  "refresh_token": "[refresh_token]"
}

Risposta

Produces: application/json;charset=UTF-8, text/html; charset=utf-8

Struttura del payload di risposta

{

  "access_token": {

    "token": stringa, token di accesso. Usato in header Authorization per autenticare le richieste API. Durata 15 min.

    "expires_at": timestamp_ISO8601 (YYYY-MM-ddThh:mm:ssZ), data e ora di scadenza di questo token

    "type": "bearer", tipo di token. Di norma bearer

  }

}

Possibili codici di risposta

  • 200 OK – Operazione riuscita

  • 400 Bad Request– errore durante l’elaborazione (il messaggio di errore fornisce la motivazione)

  • 403 Forbidden – il cliente non ha i permessi necessari per eseguire la chiamata

  • 500 Internal Server Error – Errore interno durante l’elaborazione

Esempi di messaggi di errore

  • Token expired

  • Account not authorized

  • Token generated from an invalidated refresh token

Refresh Token

Permette la rotazione del refresh token in uso, generandone uno nuovo con scadenza a 30 giorni.

E’ importante effettuare questa operazione prima della scadenza del refresh token corrente per mantenere attiva la sessione.

Il vecchio refresh token verrà invalidato anche se non ancora scaduto e quindi non sarà più utilizzabile.

Endpoint

POST /api/v2/auth/refresh

Header

  • Content-Type: application/json

Payload

  • refresh_token (string)

Risposta

Produces: application/json;charset=UTF-8, text/html; charset=utf-8

Struttura del payload di risposta

{

  "access_token": {

    "token": stringa, token di accesso. Usato in header Authorization per autenticare le richieste API. Durata 15 min.

    "expires_at": timestamp_ISO8601 (YYYY-MM-ddThh:mm:ssZ), data e ora di scadenza di questo token

    "type": "bearer", tipo di token. Di norma bearer

  },

  "refresh_token": {

    "token": stringa, token di refresh usato per aggiornare l’access_token e ruotare lo stesso refresh. Durata 30gg

    "expires_at": timestamp_ISO8601 (YYYY-MM-ddThh:mm:ssZ), data e ora di scadenza di questo token

    "type": "bearer", tipo di token. Di norma bearer

  }

}

Possibili codici di risposta

  • 200 OK – Operazione riuscita.

  • 400 Bad Request– errore durante l’elaborazione (il messaggio di errore fornisce la motivazione)

  • 403 Forbidden – il cliente non ha i permessi necessari per eseguire la chiamata

  • 500 Internal Server Error – Errore interno durante l’elaborazione

Esempi di messaggi di errore

  • Token expired

  • Account not authorized

  • Token generated from an invalidated refresh token


1.3 Caso d’uso

La sequenza di lavoro consigliata prevede:

  1. autenticazione iniziale tramite /authorize per ottenere un refresh token e un primo access token già utilizzabile. Questa chiamata dovrebbe essere eseguita solo una volta

  2. alla scadenza dell’access token in uso (durata 15 min) è necessario richiederne uno nuovo con la chiamata /token e utilzzando il refresh token

  3. prima della scadenza dei 30gg è necessario ruotare il refresh token usando /refresh

  4. se il refresh token scade sarà necessario ripetere la procedura partendo da /authorize

Access token e refresh token scaduti o invalidati non saranno più utilizzabili.

I token JWT non vengono salvati lato server: il sistema non mantiene alcuna copia persistente degli access token o refresh token emessi.

Per questo motivo, è responsabilità del cliente conservarli in modo sicuro e riservato.


2. Estrazione Ordini

Endpoint: /api/v2/order
Metodo: GET
Header Accept: CSV o JSON

Parametri (query string):

startDate: yyyy-mm-dd (filtro su data oridne)
endDate: yyyy-mm-dd (filtro su data oridne)
startModified: yyyy-mm-dd
endModified: yyyy-mm-dd
code: codice ordine
format: csv|json (se non specificato vale json)
status: sent,standby,cancelled,accepted (lista di valori separati da virgola)
columnSeparator: separatore di colonna per formato csv (es: |)
writeHeading: true|false (true per stampare le intestazioni di colonna, se non specificato vale true)
offset: primo record da estrarre
limit: numero di record da estrarre (-1 per estrarli tutti, di default vale /immagini_guida/cred-yatego-1.png )
tags: tag1,tag2 (verranno estratti gli ordini che contengono almeno uno dei tag specificati nella lista di valori separati da virgola)

 

Esempi:

##########################################################
REQUEST V2
##########################################################

GET /sr_company_ws/api/v2/order?code=15690,11-13067-60538&status=sent,accepted&start_date=2025-03-16&start_modified=2025-03-16&end_date=2025-05-14&end_modified=2025-07-14&tags=menu-tags6,menu-tags2&offset=0&limit=3&column_separator=$&write_heading=true&format=csv
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJzcm9fYXBpIiwic3ViIjoiNDciLCJhdWQiOlsic3JvX2FwaSJdLCJpYXQiOjE3NTM3ODc3NzcsImV4cCI6MTc1Mzc4ODY3NywianRpIjoiMzYxNGE3MjAtYzI0Yy00M2MyLWI3ODAtZmZjODE1OTVlYzEwIiwiYWNjb3VudF9pZCI6NDcsInVzZXJuYW1lIjoibS5jcmVtb25pbmlAc2VsbHJhcGlkby5jb20iLCJjb21wYW55X2lkIjozMTAsInRva2VuX25hbWUiOiJhY2Nlc3NfdG9rZW4iLCJleHBpcmVfYXQiOiIyMDI1LTA3LTI5VDExOjMxOjE3Ljc4MzA2NzgyMVoiLCJjcmVhdGlvbl9hdCI6IjIwMjUtMDctMjlUMTE6MTY6MTcuNzgzMDY3ODIxWiIsInJlZnJlc2hfanRpIjoiMzgyMmZlODUtN2MyMy00MDMzLWI4ODktMjRhMzczZDQwZGY5In0.eUEtodQNunimWcUwcKl91TCybu2x8WJ-2JutbHTX5qc


lista parametri decodificata

code:15690,11-13067-60538
status:sent,accepted
start_date:2025-03-16
start_modified:2025-03-16
end_date:2025-05-14
end_modified:2025-07-14
tags:menu-tags6,menu-tags2
offset:0
limit:3
column_separator:$
write_heading:true
format:csv

##########################################################
RESPONSE
##########################################################
 
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8

Payload

{
    "orders": [
        {
            "head": {
                "id": 6714,
                "shop": 168,
                "customer": 12,
                "courier": null,
                "code": "11-13067-60538",
                "code_number": 295,
                "marketplace_code": "Ebay",
                "channel_code": "Italy",
                "courier_code": "GLS Italy",
                "shipping_code": "IT_BartoliniBRTExpressEbay",
                "insurance_code": "",
                "payment_code": "CreditCard",
                "supplier_code": "",
                "buyer_loc_place": 0,
                "buyer_loc_place_dd": 0,
                "merchant_id": "marchant",
                "fields_lock": "",
                "date_order": "2025-05-12T17:27:06Z",
                "reference_1": "",
                "reference_2": "",
                "buyer_user_id": "merchant",
                "buyer_checkout_message": "",
                "buyer_email": "",
                "buyer_token": "nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6AAlIaoD5aKpgydj6x9nY+seQ==",
                "shipping_price": 5.0,
                "shipping_insurance_price": 0.0,
                "marketplace_fee": 2.45,
                "paypal_fee": 0.0,
                "shipped_by_marketplace": 0,
                "is_prime": 0,
                "cod_cash_only": 0,
                "cod_option": "",
                "cod_price": 0.0,
                "price_discount_markup": 0.0,
                "buyer_name": "Nome Cognome",
                "buyer_address1": "Via Nomevia 45",
                "buyer_address2": "",
                "buyer_zip": "CAP",
                "buyer_city": "Città",
                "buyer_province": "Provincia",
                "buyer_country": "ITA",
                "buyer_latitude": 0.0,
                "buyer_longitude": 0.0,
                "buyer_phone": "012345",
                "buyer_fax": "",
                "buyer_mobile": "",
                "buyer_fiscal_code": "",
                "buyer_vat": "",
                "currency": "EUR",
                "price": 9.0,
                "status": "sent",
                "status_old": "sent",
                "status_message": "",
                "date_payment": "2025-05-12T17:27:05Z",
                "date_shipping": "2025-05-13T13:40:58Z",
                "weight": 5.0,
                "tracking": "LT850004073",
                "note": "",
                "payment_note": "",
                "buyer_name_dd": "Nome Cognome",
                "buyer_address1_dd": "Via Nomevia 45",
                "buyer_address2_dd": "",
                "buyer_zip_dd": "CAP",
                "buyer_city_dd": "Città",
                "buyer_province_dd": "Provincia",
                "buyer_country_dd": "ITA",
                "buyer_latitude_dd": 0.0,
                "buyer_longitude_dd": 0.0,
                "buyer_phone_dd": "012345",
                "buyer_fax_dd": "",
                "buyer_mobile_dd": "",
                "shipping_note": "",
                "paypal_transaction_id": "",
                "billed": 0,
                "tags": "menu-tags2;",
                "courier_info": {},
                "problem_description": "",
                "shipping_cost": 0.0,
                "feedbacks": {},
                "feedbacks_date": "2025-05-12T17:44:17Z",
                "content_type": "",
                "hidden": 0,
                    "upload_status": {
                        "request_payload": "{\"CreatedTime\":\"2025-05-12T19:27:06.000Z\",\"AmountPaid\":{\"currencyID\":\"EUR\",\"content\":9},\"OrderID\":\"11-13067-60538\",\"PaymentHoldStatus\":\"None\",\"TransactionArray\":{\"Transaction\":{\"Status\":{\"ReturnStatus\":\"NotApplicable\",\"InquiryStatus\":\"NotApplicable\",\"PaymentHoldStatus\":\"None\"},\"ActualHandlingCost\":{\"currencyID\":\"EUR\",\"content\":0},\"Platform\":\"eBay\",\"ActualShippingCost\":{\"currencyID\":\"EUR\",\"content\":5},\"ShippingDetails\":{\"SalesTax\":{\"SalesTaxPercent\":0},\"ShipmentTrackingDetails\":{\"ShipmentTrackingNumber\":\"LT850004073\",\"ShippingCarrierUsed\":\"GLS Italy\"},\"SellingManagerSalesRecordNumber\":295},\"TransactionSiteID\":\"Italy\",\"Buyer\":{\"Email\":\"Invalid Request\",\"UserLastName\":\"Cognome\",\"UserFirstName\":\"Nome\"},\"TransactionPrice\":{\"currencyID\":\"EUR\",\"content\":4},\"ShippedTime\":\"2025-05-13T15:40:58.000Z\",\"QuantityPurchased\":1,\"TransactionID\":10072442519011,\"ExtendedOrderID\":\"11-13067-60538\",\"eBayPlusTransaction\":false,\"Item\":{\"Site\":\"Italy\",\"Title\":\"284 Fiat 7579570 TAPPO MONOBLOCCO FIAT PANDA\",\"SKU\":\"14_284\",\"ItemID\":197139218223,\"Location\":\"priverno\"},\"Taxes\":{\"TaxDetails\":{\"TaxDescription\":\"SalesTax\",\"TaxAmount\":{\"currencyID\":\"EUR\",\"content\":0},\"TaxOnSubtotalAmount\":{\"currencyID\":\"EUR\",\"content\":0},\"Imposition\":\"SalesTax\",\"TaxOnShippingAmount\":{\"currencyID\":\"EUR\",\"content\":0},\"TaxOnHandlingAmount\":{\"currencyID\":\"EUR\",\"content\":0}},\"TotalTaxAmount\":{\"currencyID\":\"EUR\",\"content\":0}},\"ShippingServiceSelected\":{\"ShippingPackageInfo\":{\"ActualDeliveryTime\":\"2025-05-20T12:07:00.000Z\",\"EstimatedDeliveryTimeMin\":\"2025-05-14T22:00:00.000Z\",\"EstimatedDeliveryTimeMax\":\"2025-05-18T22:00:00.000Z\"}},\"CreatedDate\":\"2025-05-12T19:27:06.000Z\",\"InventoryReservationID\":10072442519011,\"FinalValueFee\":{\"currencyID\":\"EUR\",\"content\":2.45},\"OrderLineItemID\":\"197139218223-10072442519011\"}},\"EIASToken\":\"nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6AAlIaoD5aKpgydj6x9nY+seQ==\",\"OrderStatus\":\"Completed\",\"BuyerUserID\":\"userid\",\"IsMultiLegShipping\":false,\"AdjustmentAmount\":{\"currencyID\":\"EUR\",\"content\":0},\"SellerEIASToken\":\"nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6MCmYapC5OKpQSdj6x9nY+seQ==\",\"CheckoutStatus\":{\"Status\":\"Complete\",\"LastModifiedTime\":\"2025-05-20T11:22:42.000Z\",\"PaymentInstrument\":\"PayPal\",\"PaymentMethod\":\"CreditCard\",\"IntegratedMerchantCreditCardEnabled\":false,\"eBayPaymentStatus\":\"NoPaymentFailure\"},\"AmountSaved\":{\"currencyID\":\"EUR\",\"content\":0},\"ShippingDetails\":{\"SalesTax\":{\"SalesTaxPercent\":0,\"ShippingIncludedInTax\":false,\"SalesTaxAmount\":{\"currencyID\":\"EUR\",\"content\":0}},\"ShippingServiceOptions\":{\"ExpeditedService\":false,\"ShippingTimeMax\":2,\"ShippingServiceCost\":{\"currencyID\":\"EUR\",\"content\":5},\"ShippingService\":\"IT_BartoliniBRTExpressEbay\",\"ShippingServicePriority\":1,\"ShippingTimeMin\":1},\"SellingManagerSalesRecordNumber\":295},\"Subtotal\":{\"currencyID\":\"EUR\",\"content\":4},\"PaidTime\":\"2025-05-12T19:27:05.390Z\",\"ContainseBayPlusTransaction\":false,\"ShippedTime\":\"2025-05-13T15:40:58.000Z\",\"MonetaryDetails\":{\"Payments\":{\"Payment\":{\"Payer\":{\"type\":\"eBayUser\",\"content\":\"userid\"},\"ReferenceID\":{\"type\":\"ExternalTransactionID\",\"content\":2461729608401},\"FeeOrCreditAmount\":{\"currencyID\":\"EUR\",\"content\":0},\"PaymentTime\":\"2025-05-12T19:27:05.390Z\",\"PaymentAmount\":{\"currencyID\":\"EUR\",\"content\":9},\"Payee\":{\"type\":\"eBayUser\",\"content\":\"lea-line\"},\"PaymentStatus\":\"Succeeded\"}}},\"ExtendedOrderID\":\"11-13067-60538\",\"ShippingServiceSelected\":{\"ShippingServiceCost\":{\"currencyID\":\"EUR\",\"content\":5},\"ShippingService\":\"IT_BartoliniBRTExpressEbay\",\"ShippingPackageInfo\":{\"ActualDeliveryTime\":\"2025-05-20T12:07:00.000Z\"}},\"ShippingAddress\":{\"Street2\":\"\",\"Street1\":\"Via Nomevia 45\",\"AddressOwner\":\"eBay\",\"CountryName\":\"Italy\",\"Phone\":012345,\"StateOrProvince\":\"Provincia\",\"Country\":\"IT\",\"PostalCode\":\"CAP\",\"CityName\":\"Città\",\"AddressID\":012345,\"Name\":\"Nome\"},\"Total\":{\"currencyID\":\"EUR\",\"content\":9},\"CancelStatus\":\"NotApplicable\",\"SellerUserID\":\"lea-line\"}",
                        "request_date": "Wed May 28 11:19:19 UTC 2025"
                    }
                },
                "marketplace_country": "ITA",
                "agent": "",
                "buyer_invoice_ecode": "",
                "buyer_pec": "",
                "date_last_ship": null,
                "date_last_delivery": "2025-05-18T20:00:00Z",
                "created": "2025-05-12T17:32:28Z",
                "modified": "2025-05-28T09:19:19Z",
                "is_b2b": 0,
                "billing_info": {},
                "force_profit_loss_calculation": "false",
                "total_tax": 0.0,
                "reservation": 0,
                "dbClass": "com.sellrapido.common.model.db.company.Order_head",
                "tags_label": ";CONTRORDINE DA FARE;"
            },
            "rows": [
                {
                    "id": 7040,
                    "order_head": 6714,
                    "order_row_supplier": null,
                    "supplier": null,
                    "order_supplier_code": "",
                    "courier_code": "GLS Italy",
                    "tracking": "",
                    "fields_lock": "",
                    "shipping_cost": 1.0,
                    "shipping_code": "IT_BartoliniBRTExpressEbay",
                    "transaction_id": "10072442519011",
                    "product_id": "197139218223",
                    "sku": "14_284",
                    "ean": "",
                    "brand": "Fiat",
                    "mpn": "x",
                    "sku_parent": "",
                    "title": "284 Fiat 7579570 TAPPO MONOBLOCCO FIAT PANDA",
                    "title_extra": "",
                    "quantity": 1,
                    "stock_unloaded": 1,
                    "price": 4.0,
                    "price_total": 4.0,
                    "price_discount_markup": 0.0,
                    "price_cost": 3.0,
                    "refund_price": 0.0,
                    "refund_date": null,
                    "refund_reason": "",
                    "shipping_price": 5.0,
                    "shipping_insurance_price": 0.0,
                    "date_shipping": "2025-05-13T13:40:58Z",
                    "shipping_note": "",
                    "cod_price": 0.0,
                    "marketplace_fee": 0.0,
                    "weight": 5.0,
                    "note": "",
                    "vat_perc": 22.0,
                    "image_url": "",
                    "category_id": "",
                    "category_name": "",
                    "date_payment": null,
                    "product_info": {
                        "fieldConstraints": null,
                        "product_id": 2054,
                        "catalog_id": 14,
                        "catalog_code": "CUSTOM",
                        "catalog_name": "listino_catene",
                        "sku": "284",
                        "sku_noprefix": null,
                        "ean": "",
                        "mpn": "x",
                        "isbn": "",
                        "brand": "Fiat",
                        "catalog_category1": "RICAMBI",
                        "catalog_category2": "PF e SPED",
                        "catalog_category3": "SPED 2GG",
                        "url_image1": "https://app.sellrapido.com/static/cmp/3697/ctl/34/images/18886479-1-1627883055441.jpg",
                        "price1": 3.0,
                        "price_shipping1": 1.0,
                        "vat_perc": 0.0,
                        "sku_variation": null,
                        "ean_variation": "",
                        "warehouse": "",
                        "on_demand_days": 0,
                        "on_demand": false,
                        "extra1": "",
                        "extra2": "",
                        "extra3": "",
                        "extra4": "",
                        "extra5": "",
                        "extra6": "",
                        "extra7": "",
                        "extra8": "",
                        "extra9": "",
                        "price2": 0.0,
                        "price3": 0.0,
                        "price4": 0.0,
                        "price5": 0.0,
                        "price6": 0.0,
                        "price_shipping2": 0.0,
                        "price_shipping3": 0.0,
                        "price_shipping4": 0.0,
                        "price_shipping5": 0.0,
                        "price_shipping6": 0.0,
                        "price_cost": 0.0,
                        "variations": [],
                        "compatibility": {},
                        "attributes": {},
                        "listingFees": {
                            "fieldConstraints": null,
                            "marketplace_fee": 0.0,
                            "shipping_price": 0.0,
                            "shipping_cost": 0.0,
                            "fee_additional": 0.0,
                            "paypal_fee": 0.0
                        },
                        "condition_code": "none",
                        "condition_description": "",
                        "supplier_sku_prefix": "",
                        "repricing": false,
                        "no_repricing_price": null,
                        "lowest_price": 0.0,
                        "quantity": 10.0,
                        "is_sro": true,
                        "listing_price": 4.0,
                        "listing_price_noshipping": 4.0,
                        "listing_price_shipping1": 0.0,
                        "listing_priceB2B": 0.0,
                        "origin_country": "IT",
                        "title": "7579570 TAPPO MONOBLOCCO FIAT PANDA",
                        "delivery_days": 1
                    },
                    "on_demand_date": null,
                    "created": "2025-05-12T17:32:29Z",
                    "modified": "2025-05-28T09:19:20Z",
                    "order_supplier": 0,
                    "refund_supplier_quantity": 0,
                    "refund_marketplace_fee": 0.0,
                    "product_tax": 0.0,
                    "no_vat": "false",
                    "courier_info": {}
                }
            ]
        },
        {
            "head": {
                "id": 2476,
                "shop": 168,
                "customer": 1499,
                "courier": null,
                "code": "15690",
                "code_number": 0,
                "marketplace_code": "Scaboo",
                "channel_code": "Scaboo Italian",
                "courier_code": "BARTOLINI1",
                "shipping_code": "corriere (consegna in circa 3/4 gg lavorativi dall'accredito del vostro pagamento) - servizio di tracciamento corriere con track",
                "insurance_code": "",
                "payment_code": "Ordine Generato In Automatico Tramite API",
                "supplier_code": "Catalogo prodotti italiano",
                "buyer_loc_place": 0,
                "buyer_loc_place_dd": 0,
                "merchant_id": "https://shop.b2bdrop.com/",
                "fields_lock": "",
                "date_order": "2025-03-17T06:12:08Z",
                "reference_1": "",
                "reference_2": "",
                "buyer_user_id": "",
                "buyer_checkout_message": "{&quot;sr_origin_catalogs&quot;:{&quot;77_BD_IT_0001_070.00000000010969&quot;:12}}",
                "buyer_email": "info@unhiverse.com",
                "buyer_token": "",
                "shipping_price": 0.0,
                "shipping_insurance_price": 0.0,
                "marketplace_fee": 0.0,
                "paypal_fee": 0.0,
                "shipped_by_marketplace": 0,
                "is_prime": 0,
                "cod_cash_only": 0,
                "cod_option": "",
                "cod_price": 0.0,
                "price_discount_markup": 0.0,
                "buyer_name": "Nome Cognome",
                "buyer_address1": "Via Nomevia 2",
                "buyer_address2": "",
                "buyer_zip": "CAP",
                "buyer_city": "Città",
                "buyer_province": "ITALIA",
                "buyer_country": "ITA",
                "buyer_latitude": 0.0,
                "buyer_longitude": 0.0,
                "buyer_phone": "012345",
                "buyer_fax": "",
                "buyer_mobile": "",
                "buyer_fiscal_code": "012345",
                "buyer_vat": "012345",
                "currency": "EUR",
                "price": 13.11,
                "status": "sent",
                "status_old": "accepted",
                "status_message": "",
                "date_payment": "2025-03-17T06:12:08Z",
                "date_shipping": null,
                "weight": 0.0,
                "tracking": "280340324736",
                "note": "",
                "payment_note": "",
                "buyer_name_dd": "Nome Cognome",
                "buyer_address1_dd": "Via Nomevia",
                "buyer_address2_dd": "",
                "buyer_zip_dd": "CAP",
                "buyer_city_dd": "Città",
                "buyer_province_dd": "Provincia",
                "buyer_country_dd": "ITA",
                "buyer_latitude_dd": 0.0,
                "buyer_longitude_dd": 0.0,
                "buyer_phone_dd": "012345",
                "buyer_fax_dd": "",
                "buyer_mobile_dd": "",
                "shipping_note": "",
                "paypal_transaction_id": "",
                "billed": 0,
                "tags": "menu-tags7;menu-tags6;",
                "courier_info": {},
                "problem_description": "",
                "shipping_cost": 0.0,
                "feedbacks": {},
                "feedbacks_date": null,
                "content_type": "",
                "hidden": 0,
                "marketplace_country": "ITA",
                "agent": "",
                "buyer_invoice_ecode": "m5uxcr1",
                "buyer_pec": "pec@pec.it",
                "date_last_ship": null,
                "date_last_delivery": null,
                "created": "2025-03-17T06:13:25Z",
                "modified": "2025-05-21T08:07:24Z",
                "is_b2b": 0,
                "billing_info": {},
                "force_profit_loss_calculation": "false",
                "total_tax": 2.36,
                "reservation": 0,
                "dbClass": "com.sellrapido.common.model.db.company.Order_head",
                "tags_label": ""
            },
            "rows": [
                {
                    "id": 3213,
                    "order_head": 2476,
                    "order_row_supplier": null,
                    "supplier": null,
                    "order_supplier_code": "",
                    "courier_code": "",
                    "tracking": "",
                    "fields_lock": "",
                    "shipping_cost": 0.0,
                    "shipping_code": "",
                    "transaction_id": "15690-451",
                    "product_id": "451",
                    "sku": "77_BD_IT_0001_070.00000000010969",
                    "ean": "8000866109697",
                    "brand": "Dc Comics",
                    "mpn": "",
                    "sku_parent": "",
                    "title": "Borraccia Ciclo Batman Bici Bambino 350 Ml Nero Giallo",
                    "title_extra": "",
                    "quantity": 1,
                    "stock_unloaded": 1,
                    "price": 13.11,
                    "price_total": 13.11,
                    "price_discount_markup": 0.0,
                    "price_cost": 9.95,
                    "refund_price": 0.0,
                    "refund_date": null,
                    "refund_reason": "",
                    "shipping_price": 0.0,
                    "shipping_insurance_price": 0.0,
                    "date_shipping": null,
                    "shipping_note": "",
                    "cod_price": 0.0,
                    "marketplace_fee": 0.0,
                    "weight": 0.0,
                    "note": "",
                    "vat_perc": 22.0,
                    "image_url": "https://scambiodati.ecommercezone.it/img/10969 1.jpg",
                    "category_id": "",
                    "category_name": "",
                    "date_payment": null,
                    "product_info": {
                        "fieldConstraints": null,
                        "product_id": 258354018,
                        "catalog_id": 77,
                        "catalog_code": "CUSTOM",
                        "catalog_name": "COLZANI_AUTO/MOTO_ITA",
                        "sku": "BD_IT_0001_070.00000000010969",
                        "sku_noprefix": null,
                        "ean": "8000866109697",
                        "mpn": "",
                        "isbn": "",
                        "brand": "Dc Comics",
                        "catalog_category1": "CICLO",
                        "catalog_category2": "LINEA BAMBINO",
                        "catalog_category3": "BORRACCE",
                        "url_image1": "https://scambiodati.ecommercezone.it/img/10969 1.jpg",
                        "price1": 9.95,
                        "price_shipping1": 0.0,
                        "vat_perc": 0.0,
                        "sku_variation": null,
                        "ean_variation": "",
                        "warehouse": "",
                        "on_demand_days": 0,
                        "on_demand": false,
                        "extra1": "",
                        "extra2": "",
                        "extra3": "",
                        "extra4": "",
                        "extra5": "",
                        "extra6": "",
                        "extra7": "",
                        "extra8": "",
                        "extra9": "",
                        "price2": 0.0,
                        "price3": 0.0,
                        "price4": 0.0,
                        "price5": 0.0,
                        "price6": 0.0,
                        "price_shipping2": 0.0,
                        "price_shipping3": 0.0,
                        "price_shipping4": 0.0,
                        "price_shipping5": 0.0,
                        "price_shipping6": 0.0,
                        "price_cost": 0.0,
                        "variations": [],
                        "compatibility": {},
                        "attributes": {},
                        "listingFees": {
                            "fieldConstraints": null,
                            "marketplace_fee": 0.0,
                            "shipping_price": 0.0,
                            "shipping_cost": 0.0,
                            "fee_additional": 0.0,
                            "paypal_fee": 0.0
                        },
                        "condition_code": "none",
                        "condition_description": "",
                        "supplier_sku_prefix": "",
                        "repricing": false,
                        "no_repricing_price": null,
                        "lowest_price": 0.0,
                        "quantity": 40.0,
                        "is_sro": true,
                        "listing_price": 13.11,
                        "listing_price_noshipping": 13.11,
                        "listing_price_shipping1": 0.0,
                        "listing_priceB2B": 0.0,
                        "origin_country": "",
                        "title": "Borraccia ciclo Batman bici bambino 350 ml nero giallo"
                    },
                    "on_demand_date": null,
                    "created": "2025-03-17T06:13:28Z",
                    "modified": "2025-03-17T10:00:21Z",
                    "order_supplier": 0,
                    "refund_supplier_quantity": 0,
                    "refund_marketplace_fee": 0.0,
                    "product_tax": 2.36,
                    "no_vat": "false",
                    "courier_info": {}
                }
            ]
        }
    ],
    "totalCount": 2,
    "offset": 0,
    "limit": 3


3. Aggiornamento stato ordini

Endpoint: /api/v2/order/status
Metodo: POST

Permette di aggiornare i seguenti dati:

  • lo stato 
  • le informazioni di tracking e corriere

  • la data di pagamento

Attenzione:

È possibile fare aggiornamenti massivi di più ordini con unica chiamata.

È possibile aggiornare il tracking e corriere, ma non rimuoverli.

È possibile aggiornare la data di pagamento, ma non rimuoverla.

Il payload della richiesta deve avere la seguente forma:

[
{"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"}
]  
 

Ogni elemento dell'array è un aggiornamento di un diverso ordine

  • id è l'id dell'ordine (obbligatorio)
  • status è lo stato dell'ordine. Può avere i valori di standby, accepted, sent, cancelled (obbligatorio)
  • courier_code è alternativo a courier e rappresenta il codice parlante del corriere. Può essere uno dei seguenti valori: AWS, BARTOLINI1, DBSCHENKER, DHL, EBOOST, FEDEX, FERCAM, GLS, GLSFIX, MBE, NEXIVE_EXP, NEXIVE_REG, POSTE_ITALIANE_CRONO, SDA, SOGETRAS, SPEDIAMO.IT, TNT, UPS
  • tracking è il codice di tracking che deve essere popolato assieme al courier
  • payment_date: data del pagamento in formato ISO 8601
  • shipping_note: note di spedizione, non obbligatorio

Sono implementati vari controlli di coerenza.

La chiamata può restituire un elenco di errori.
I cambi di stato che hanno avuto successo (o non hanno prodotto nessuna modifica sul sistema) non compaiono nella risposta.

Esempio di risposta con errori:

[
{
"index": 0,
"id": "1",
"error_message": "order with id 1 has tracking but no courier"
}
]

  • index identifica l'iesimo elemento dell'input. Può essere valorizzata a -1 nel caso non sia possibile far risalire l'errore a uno specifico elemento.
  • id si rifererisce all'id dell'ordine
  • error_message è una descrizione dell'errore


Nel caso nessun cambio di stato abbia generato errori, la risposta sarà un elenco vuoto:

[

 

Esempi:

##################################
REQUEST V2
##################################
POST /sr_company_ws/api/v2/order/status
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJzcm9fYXBpIiwic3ViIjoiNDciLCJhdWQiOlsic3JvX2FwaSJdLCJpYXQiOjE3NTM3OTgxNTEsImV4cCI6MTc1Mzc5OTA1MSwianRpIjoiOWUzZTY1OTctOTQwOS00ZTIyLWI5NDktOTQ4MGYxNWFkZGYwIiwiYWNjb3VudF9pZCI6NDcsInVzZXJuYW1lIjoibS5jcmVtb25pbmlAc2VsbHJhcGlkby5jb20iLCJjb21wYW55X2lkIjozMTAsInRva2VuX25hbWUiOiJhY2Nlc3NfdG9rZW4iLCJleHBpcmVfYXQiOiIyMDI1LTA3LTI5VDE0OjI0OjExLjAyODMyNzcwN1oiLCJjcmVhdGlvbl9hdCI6IjIwMjUtMDctMjlUMTQ6MDk6MTEuMDI4MzI3NzA3WiIsInJlZnJlc2hfanRpIjoiMzgyMmZlODUtN2MyMy00MDMzLWI4ODktMjRhMzczZDQwZGY5In0.Y6P87Qc2IphD026gfDqaK6Q31olyFmlxy4j56aZxYsk
 
[{
"id": 2476,
"status": "sent",
"tracking": "M6660159584",
"courier_code":"666"
}]

##################################
RESPONSE
##################################

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Encoding: gzip
 
[]


in caso di errore payload di response del tipo

[
    {
        "index": 0,
        "id": "2476",
        "error_message": "Unable to enqueue a change status request for order 15690 on shop Sellrapido e-Commerce https://www.b2bdrop.com/ - ITA due to a previous pending request"
    }
]

index: indice dell'ordine nel payload di richiesta (base 0)
id: id dell'ordine
error_message: informazioni sull'errore che non ha permesso l'aggiornamento


4. Estrazione Prodotti

Endpoint: /api/v2/product
Metodo: GET

I parametri sono i seguenti
catalog: l'id del catalogo per cui si vogliono scaricare i prodotti. Se non specificato saranno estratti i prodotti di tutti i cataloghi.
published: true, inserisci "true" se vuoi scaricare solo i prodotti pubblicati su almeno un marketplace. Se non specificato saranno estratti i prodotti pubblicati e non.
zip: false, inserisci "false" se vuoi scaricare il tracciato .csv in un file zip. Se non specificato verrà scaricato un tracciato csv non compresso.
fields: sku,ean (elenco delle colonne che compariranno nell'estrazione)
field_separator: | (carattere usato per separare i campi del tracciato). Se non specificato, verrà usato il separatore |
row_separator: \n (carattere usato per separare le righe del tracciato. Se non specificato, verrà usato il separatore nuova linea \n)
text_qualifier: campo usato come qualificatore delle stringhe del tracciato. Se non specificato, non viene usato nessun qualificatore


Esempi:

##################################
REQUEST V2
##################################
GET /sr_company_ws/api/v2/product?fields=id,sku,title&catalog=77&published=false&zip=false&field_separator=%C2%A7&row_separator=%0A&text_qualifier=%27
Accept: application/csv
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJzcm9fYXBpIiwic3ViIjoiNDciLCJhdWQiOlsic3JvX2FwaSJdLCJpYXQiOjE3NTM3OTkzNTcsImV4cCI6MTc1MzgwMDI1NywianRpIjoiMDNjNzg0NDgtNmU5OS00ZTQ5LTg1ZDEtYjU1NmMwMWZjM2YwIiwiYWNjb3VudF9pZCI6NDcsInVzZXJuYW1lIjoibS5jcmVtb25pbmlAc2VsbHJhcGlkby5jb20iLCJjb21wYW55X2lkIjozMTAsInRva2VuX25hbWUiOiJhY2Nlc3NfdG9rZW4iLCJleHBpcmVfYXQiOiIyMDI1LTA3LTI5VDE0OjQ0OjE3LjU5OTg5NTM5NFoiLCJjcmVhdGlvbl9hdCI6IjIwMjUtMDctMjlUMTQ6Mjk6MTcuNTk5ODk1Mzk0WiIsInJlZnJlc2hfanRpIjoiMzgyMmZlODUtN2MyMy00MDMzLWI4ODktMjRhMzczZDQwZGY5In0.uhDsRDEbQbklQV6Alghq5vmPqnOqdN_2yWfghRarrt4


lista parametri decodificata

fields:id,sku,title
catalog:77
published:false
zip:false
field_separator
row_separator:%0A
text_qualifier:'



################################
RESPONSE
################################ 
HTTP/1.1 200 OK
Content-Type: application/csv;charset=UTF-8

 
id§sku§title
'258264905'§'BD_IT_0009_AU22X2-P'§'Piedistallo per colonnina ULTRA'
'258264907'§'BD_IT_0009_AU22X2P-UACP'§'MaxiCharger AC ULTRA 2*22kW - 2 veicoli, versione con POS'
'258264910'§'BD_IT_0009_PWKIT-3KWSR'§'Kit montaggio 6 Moduli x tetto pannelli sandwich escluso binario'
'258264911'§'BD_IT_0009_PWKIT-3KWTR'§'Kit montaggio 6 moduli x tetti a tegola - escluso binario'


 

5. Creazione/Aggiornamento Prodotti

Creazione Prodotti
Endpoint: /api/v2/product
Metodo: POST

Aggiornamento Prodotti
Endpoint: /api/v2/product
Metodo: PATCH

Le API Prodotti permettono di aggiornare qualsiasi prodotto indipendentemente dalla tipologia di catalogo a cui appartiene: data entry, fornitore, custom, inventario marketplace, etc.
Se il catalogo è agganciato a una fonte dati esterna caricata in automatico (es: file fornitore), i dati caricati via API potrebbero venir sovrascritti dai processi automatici di importazione effettuati da Sellrapido. 
Per tale ragione si suggerisce di usare le API con cataloghi di tipo "data entry" oppure di bloccare preventivamente i campi dei prodotti che si desidera aggiornare via API

Descrizione

Di seguito trovate le specifiche per implementare le API POST e PATCH utilizzabili per la creazione e l'aggiornamento di una lista di prodotti all'interno di Sellrapido.

  • POST: consente la creazione di nuovi prodotti.
  • PATCH: consente l'aggiornamento parziale dei prodotti esistenti.

Entrambe le API utilizzano formato JSON e restituiscono codici di stato HTTP standard.

POST /api/product/{uuid}

Consente di creare uno o più prodotti in base a catalogo e SKU.

Endpoint

POST /api/product/{uuid}

Header

Content-Type: application/json

Restrizioni Payload

  • Array JSON con massimo 1000 elementi
  • Ogni elemento deve includere:
    • catalog(integer, required)
    • sku(string, required)
    • price1(double, required > 0)
    • quantity(integer, required > 0)

Campi Modificabili

  • condition_code, condition_description, sku_label, title, subtitle, description, description_extra, brand
  • url_image1 → url_image9
  • price2 → price6, price_cost, price_shipping1 → price_shipping6
  • fee_additional1 → fee_additional6, vat_perc, ean, isbn, mpn, asin
  • weight, weight_um, variations, extra1 → extra9
  • item_note, delivery_days, attributes, on_demand, on_demand_days
  • fields_lock: contiene l'elenco separato da virgola dei nomi di campo che non devono essere alterati dalle procedure di importazione catalogo; questo serve a mantenere i valori impostati via API, ad esempio description,title,url_image1
  • catalog_category1/2/3: stringhe
  • channel_categories: array json fatto come indicato nella guida del feed prodotti Sellrapido, ovvero come esempio seguente

 

[

    {

      "channel": 1,

      "category_id": "57267"

    },

    {

      "channel": 503,

      "category_id": "Fourniture de bureau et scolaire/Equipements de bureau/Accessoires bureau divers"

    }

]

Esempio Payload

[
{
"catalog": 123456,
"sku": "SKU-00123",
"title": "Nuovo titolo prodotto",
"subtitle": "Sottotitolo aggiornato",
"description": "<p>Questa è una <strong>descrizione HTML</strong> con un elenco:</p><ul><li>Caratteristica 1</li><li>Caratteristica 2</li></ul><p>Grazie per l'interesse!</p>",
"brand": "MarcaX",
"quantity": 10,
"url_image1": "https://example.com/image1.jpg",
"price1": 19.99,
"price_cost": 10.50,
"vat_perc": 22,
"ean": "1234567890123",
"weight": 0.75,
"weight_um": "kg",
"extra1": "Informazione extra 1",
"item_note": "Nota sull'articolo",
"delivery_days": 3,
"on_demand": 1,
"on_demand_days": 7
}
]

Risposta

{
"created_items": [
{"index": 1, "data": { "catalog": 123456, "sku": "SKU-00123", ... }},
...
],
"errors": [
{"index": 0, "message": "Invalid fields [url]"},
...
]
}

PATCH /api/product/{uuid}

Consente aggiornamenti parziali dei prodotti.

Endpoint

PATCH /api/product/{uuid}

Header

Content-Type: application/json

Restrizioni Payload

  • Array JSON con massimo 1000 elementi
  • Ogni elemento deve includere:catalog,sku

Campi Modificabili

Uguali a quelli della POST.

Esempio Payload

[
{
"catalog": 123456,
"sku": "SKU-00123",
"price1": 17.1,
"quantity": 15,
"attributes": [{ "name": "Numero prese Scart", "value": "1" }]
}
]

Risposta

{
"updated_items": [
{"index": 1, "data": {"price1": 17.1, ...}},
...
],
"errors": [
{"index": 0, "message": "Invalid fields [url]"},
...
]
}

Codici di Risposta

  • 200 OK – Richiesta accettata.
  • 400 Bad Request – Dati non corretti.
  • 500 Internal Server Error – Errore interno.

Messaggi di Errore Possibili

  • Request body must be an array
  • Invalid fields [field1, field2]
  • No updatable fields
  • Product `SKU` not found in catalog ID
  • Validation error: invalid format for field `field`

6. Migrazione API v1 a v2

Gli endpoint della versione V1 resteranno attivi solo temporaneamente, al fine di garantire la compatibilità con i client esistenti durante la migrazione verso la V2.

Durante questo periodo, sia gli endpoint V1 che quelli V2 saranno disponibili.

I client sono fortemente invitati a passare alla versione V2, che offre un'architettura più solida, sicura e standardizzata.

Gli endpoint V1 non richiedono autenticazione tramite access token, ma non riceveranno ulteriori aggiornamenti o correzioni evolutive.

La data di dismissione definitiva degli endpoint V1 è fissata per il 12/01/2026

Esempi migrazione v1 -> v2

- Aggiornamento ordini (API - update orders status.txt)
- Estrazione ordini (API - list orders.txt)
- Estrazione prodotti (API - list products.txt)