BaseTender
  1. Trips
BaseTender
  • Documentazione
  • Auth
    • auth
      POST
  • Vehicles
    • /vehicles/plate/:plate
      GET
    • /vehicles/id/:id
      GET
    • /vehicles/all/:company_id
      GET
    • /vehicles/update/:id
      PUT
  • Companies
    • /companies/create
      POST
  • Users
    • /users/create
      POST
    • /users/createResetOauthPw
      POST
    • /users/resetOauthPw
      POST
    • /users/resetLegacyPw
      POST
  • Trips
    • /trips/all/:company_id/:user_id
      GET
    • /trips/mine/:company_id
      GET
    • /trips/quoted/:company_id
      GET
    • /trips/:id/set/status/:status
      POST
    • /trips/details/:id/:company_id
      GET
    • /trips/all_data/:trip_id
      GET
    • /trips/add
      POST
  • Offers
    • /offers/:id/set/status/:status
      POST
    • /offers/:id/set/offer_business/:offer
      POST
    • offers/:trip_id
      GET
  • Invoices
    • /invoices/mine/:company_id
      GET
    • /invoices/send
      POST
    • /invoices/documents/:trip_id/:type?
      GET
    • /invoices/documents/insert
      POST
    • /invoices/documents/delete/:document_id
      DELETE
  1. Trips

/trips/add

Testing
POST
/trips/add
Api, per inserimento di un trip a sistema. La route verifica se la company e lo user esistono già e nel caso le crea prima dell'inserimento effettivo del trip. La route restituisce gli id della company, dello user e del trip appena creato.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json

Examples

Responses

🔴500Server Error
application/json
Body

🟢200Message Success
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://tender.whyb.it:8443/v1/trips/add' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "trip": {
        "viaggi": [
            {
                "tipo_transazione": "carico",
                "merce_carico": [
                    {
                        "length": 100,
                        "depth": 100,
                        "heigth": 100,
                        "weight": 100,
                        "quantity": 10,
                        "sovrapponibile": true
                    }
                ],
                "tassativita": "pronta_dal",
                "date": "2025-05-28",
                "select_orario": "giornata",
                "hour_from": "",
                "hour_to": "",
                "complete_address": "Via della Magnina, Cuneo, CN, Italia",
                "city": "Cuneo",
                "cap": "12100",
                "province": "CN",
                "country_code": "IT",
                "country": "Italia",
                "isZTL": true,
                "hasVincoliDiDimensione": true,
                "vincoli_di_dimensione": "solo_motrice",
                "max_metri": 50,
                "tipo_allestimento": "frigo",
                "copri_scopri": false,
                "temperature": "-25-28",
                "is_adr": true,
                "adr_class": "classe test",
                "capi_appesi": true,
                "nr_stanghe": 10,
                "assicurazione_all_risks": true,
                "valore_merce_assicurata": "5000000",
                "scambio_epal": true,
                "sistemi_di_ancoraggio_cinghie": true,
                "antifurto_gps": true,
                "sponda_idraulica": true,
                "transpallet": true,
                "is_sigillabile": true,
                "ord": 0
            },
            {
                "tipo_transazione": "scarico",
                "merce_scarico": [
                    {
                        "length": 100,
                        "depth": 100,
                        "heigth": 100,
                        "weight": 100,
                        "quantity": 10,
                        "sovrapponibile": true
                    }
                ],
                "tassativita": "pronta_dal",
                "tipo_viaggio": "24",
                "date": "2025-05-30",
                "select_orario": "giornata",
                "hour_from": "",
                "hour_to": "",
                "complete_address": "Corso Belgio, Torino, TO, Italia",
                "city": "Torino",
                "cap": "10153",
                "province": "TO",
                "country_code": "IT",
                "country": "Italia",
                "isZTL": true,
                "hasVincoliDiDimensione": true,
                "vincoli_di_dimensione": "solo_furgone",
                "max_metri": null,
                "ord": 1
            }
        ],
        "tender_expiration": 1748679480000,
        "ordine_tassativo": true,
        "note": "test",
        "company_details": {
            "vat_nr": "123456789",
            "province": "CN",
            "house_number": "20",
            "country": "Italia",
            "city": "Cuneo",
            "cf": "455456465",
            "cap": "12100",
            "address": "via della magnina",
            "name": "pinco pallo srl"
        },
        "user_details":{
            "email": "it@whyb.it",
            "name":"pinco",
            "surname":"pallo",
            "phone_nr":"564545564564"
        }
    }
}'
Response Response Example
500 - Success
{ "message": "user assigned to another company. To proceed call the support." }
Modified at 2025-09-18 14:56:16
Previous
/trips/all_data/:trip_id
Next
/offers/:id/set/status/:status
Built with