API Callback URLs

General information about Callback URL

This solu­tion allows you to down­load event sta­tus­es from the Trans.eu Plat­form. To the return address pro­vid­ed by the cus­tomer (callback_url), event sta­tus­es are sent for objects (freights, orders, etc.) with a return address. To receive noti­fi­ca­tions about events relat­ed to the added objects (freights, orders, etc.):

call­back address should start with pro­to­col (http:// or https://)

Callback flow

Callback Flow

Example of using “callback_url” (line 3) when creating a new freight:

{
  "external_source": "1_api",
  "callback_url": "http://example.com/msg",
  "publish": true,
  "capacity": 15,
  "requirements": {
    "is_ftl": true,
    "required_truck_bodies": [
      "cooler"
    ]
  },
  "loads": [],
  "spots": [
    {
      "spot_order": 1,
      "operations": [
        {
          "type": "loading",
          "timespans": {
            "begin": "2021-02-02T15:00:00+0000",
            "end": "2021-02-02T16:00:00+0000"
          },
          "operation_order": 1
        }
      ],
      "place": {
        "address": {
          "country": "PL",
          "postal_code": "96-500",
          "locality": "Sochaczew"
        }
      }
    },
    {
      "spot_order": 2,
      "operations": [
        {
          "type": "unloading",
          "timespans": {
            "begin": "2021-02-03T21:59:59+0000",
            "end": "2021-02-03T21:59:59+0000"
          },
          "operation_order": 1
        }
      ],
      "place": {
        "address": {
          "country": "PL",
          "postal_code": "50-261",
          "locality": "Wrocław"
        }
      }
    }
  ]
}

List of freight payloads received to callback URL

MetodSta­tus (event_name)JSON exam­ple
POSTfreights.publication.rejected_by_all_carriers
{
"id": "12345",
"event_name": "{freights.publication.rejected_by_all_carriers}",
"data": {}
}
POSTfreights.freight.order_from_contract_was_created
{
"id": "12345",
"event_name": "{freights.freight.order_from_contract_was_created}",
"data": {}
}
POSTfreights_processing.publication.finished
{
"id": "12345",
"event_name": "{freights_processing.publication.finished}",
"data": {}
}
POSTfreights.freight.create
{
"id": "12345",
"event_name": "{freights.freight.create}",
"data": {}
}
POSTfreights.publication.accepted
{
"id": "12345",
"event_name": "{freights.publication.accepted}",
"data": {}
}
POSTfreights.publication.created
{
"id": "12345",
"event_name": "{freights.publication.created}",
"data": {}
}
POSTfreights.proposal_request.rejected
{
"id": "12345",
"event_name": "{freights.proposal_request.rejected}",
"data": {}
}
POSTfreights.recommended_carriers.found
{
"id": "12345",
"event_name": "{freights.recommended_carriers.found}",
"data": {}
}
POSTfreights.freight.update
{
"id": "12345",
"event_name": "{freights.freight.update}",
"data": {}
}
POSTfreights.publication.finished
{
"id": "12345",
"event_name": "{freights.publication.finished}",
"data": {}
}
POSTfreights.proposal_request.negotiated
{
"id": "12345",
"event_name": "{freights.proposal_request.negotiated}",
"data": {
"price": 1000
}
}
POSTfreights.proposal_request.accepted
{
"id": "12345",
"event_name": "{freights.proposal_request.accepted}",
"data": {
"price": 1000
}
POSTfreights.publication.carrier_assign
{
"id": "12345",
"event_name": "{freights.publication.carrier_assign}",
"data": {}
}
POSTfreights_processing.publication.negotiation_time_finished
{
"id": "12345",
"event_name": "{freights_processing.publication.negotiation_time_finished}",
"data": {}
}
POSTfreights.publication.canceled
{
"id": "12345",
"event_name": "{freights.publication.canceled}",
"data": {}
}
POSTfreights_processing.proposal_request.offer_timeout
{
"id": "12345",
"event_name": "{freights_processing.proposal_request.offer_timeout}",
"data": {}
}

List of orders payloads received to callback URL

MetodSta­tus (event_name)JSON exam­ple
POSTfreight_orders.order.vehicle_and_driver_have_changed
{
    "id": "12345",
    "event_name": "{freight_orders.order.vehicle_and_driver_have_changed}",
    "data": {}
    }
POSTfreight_orders.order.attachment_removed
{
    "id": "12345",
    "event_name": "{freight_orders.order.attachment_removed}",
    "data": {}
    }
POSTfreight_orders.order.attachment_added
{
    "id": "12345",
    "event_name": "{freight_orders.order.attachment_added}",
    "data": {}
    }
POSTfreight_orders.order.attachment_visibility_changed
{
    "id": "12345",
    "event_name": "{freight_orders.order.attachment_visibility_changed}",
    "data": {}
    }
POSTfreight_orders.order.shipment_external_id_was_changed
{
    "id": "12345",
    "event_name": "{freight_orders.order.shipment_external_id_was_changed}",
    "data": {}
    }
POSTfreight_orders.order.order_was_accepted_by_contract
{
    "id": "12345",
    "event_name": "{freight_orders.order.order_was_accepted_by_contract}",
    "data": {}
    }
POSTfreight_orders.order.created
{
    "id": "12345",
    "event_name": "{freight_orders.order.created}",
    "data": {}
    }
POSTfreight_orders.order.proposal_submitted
{
    "id": "12345",
    "event_name": "{freight_orders.order.proposal_submitted}",
    "data": {}
    }
POSTfreight_orders.order.proposal_was_accepted
{
    "id": "12345",
    "event_name": "{freight_orders.order.proposal_was_accepted}",
    "data": {}
    }
POSTfreight_orders.order.order_was_cancelled
{
    "id": "12345",
    "event_name": "{freight_orders.order.order_was_cancelled}",
    "data": {}
    }

List of Dock Scheduler payloads received to callback URL

MetodSta­tus (event_name)JSON exam­ple
POSTtime_slot_management.announcement.created
{
    "id": "12345",
    "event_name": "{time_slot_management.announcement.created}",
    "data": {}
    }
POSTtime_slot_management.announcement.deleted
{
    "id": "12345",
    "event_name": "{time_slot_management.announcement.deleted}",
    "data": {}
    }
POSTtime_slot_management.announcement.updated
{
    "id": "12345",
    "event_name": "{time_slot_management.announcement.updated}",
    "data": {}
    }
POSTtime_slot_management.time_window.created
{
    "id": "12345",
    "event_name": "{time_slot_management.time_window.created}",
    "data": {}
    }
POSTtime_slot_management.time_window.deleted
{
    "id": "12345",
    "event_name": "{time_slot_management.time_window.deleted}",
    "data": {}
    }
POSTtime_slot_management.time_window.matching_result_with_freight_order_operations
{
    "id": "12345",
    "event_name": "{time_slot_management.time_window.matching_result_with_freight_order_operations}",
    "data": {}
    }
POSTtime_slot_management.time_window.updated
{
    "id": "12345",
    "event_name": "{time_slot_management.time_window.updated}",
    "data": {}
    }

List of monitorings payloads received to callback URL

MetodSta­tus (event_name)JSON exam­ple
POSTloads_monitoring.monitoring.monitoring_created
{
    "id": "12345",
    "event_name": "{loads_monitoring.monitoring.monitoring_created}",
    "data": {}
    }
POSTloads_monitoring.monitoring.monitoring_aborted
{
    "id": "12345",
    "event_name": "{loads_monitoring.monitoring.monitoring_aborted}",
    "data": {}
    }
POSTloads_monitoring.monitoring.monitoring_completed
{
    "id": "12345",
    "event_name": "{loads_monitoring.monitoring.monitoring_completed}",
    "data": {}
    }
POSTloads_monitoring.monitoring.device_added
{
    "id": "12345",
    "event_name": "{loads_monitoring.monitoring.device_added}",
    "data": {}
    }
POSTloads_monitoring.monitoring.device_removed
{
    "id": "12345",
    "event_name": "{loads_monitoring.monitoring.device_removed}",
    "data": {}
    }
POSTloads_monitoring.monitoring.monitoring_state_updated
{
    "id": "12345",
    "event_name": "{loads_monitoring.monitoring.monitoring_state_updated}",
    "data": {}
    }