External APIs for vendor Payout

Article IMrXKypp · source

External APIs to calculate payouts

There are 2 Api’s to calculate the Vendor Payouts, below mentioned and explained

https://app.shipsy.in/api/client/integration/vendor-payout/v1/calculate
This
particular Api is used to generate the trip Id for which you will be calculating the Vendor Payout.
Trip Id is created based on the fields you assign in the Req Payload, below:image.png

The Res Payload will give you the Vendor Payout Id below:image.png

Once we are done generating the Vendor Payout Id, we need to hit the other Api below, which is used to calculate the Payout for the particular trip id generated using the First Api above

https://app.shipsy.in/api/client/integration/vendor-payout/v1/fetch?vendor_payout_id=61c98350-74ab-11ee-8631-1f09e667b01f&json=true

In this Api we need to make the changes in the endpoint itself by entering the Vendor Payout ID and then hit the API.
Once the Api is hit, it will give you Res in below JSON:

{

"success": "OK",

"data": {

"vendor_payout_id": "61c98350-74ab-11ee-8631-1f09e667b01f",

"vendor_code": "V2-D",

"vendor_name": "V2-D",

"filters": {

"vendor_code": "V2-D",

"trip_status": "completed_at",

"start_date": "2023-09-01",

"end_date": "2023-09-30",

"planning_hub_code": ""

},

"payout_calculated_at": 1698398992389,

"total_payout": 87352,

"payout_url": "https://shipsy-generic-file-upload.s3.amazonaws.com/vendorPayout/easybuilddemo_27-10-2023_09_29_52_yovxcg.xlsx",

"status": "COMPLETED",

"vendor_payout_details": {

"summary": {

"vendor_name": "V2-D",

"trip_status": "completed_at",

"date_range": "2023-09-01 to 2023-09-30",

"total_details_of_vehicle_charges": 86152,

"total_details_of_trip_charges": 1200,

"total_payout": 87352

},

"details_of_vehicle_charges": [

{

"vehicle_number": "DLAB001",

"planning_hub_code": "EC_1",

"contract_type": "12hrs_01 days",

"vehicle_make_code": "TATA_CHAMPION",

"vehicle_make_name": "TATA_CHAMPION",

"distance_in_km": 21263,

"trip_duration_in_hrs": 136.38,

"total_trips": 15,

"vehicle_charges": 1000,

"vehicle_km_charges": 84652,

"vehicle_hr_charges": 500,

"final_price": 86152

},

{

"vehicle_number": "DLAB002",

"planning_hub_code": "EC_1",

"contract_type": "per_trip",

"vehicle_make_code": "TATA_CHAMPION",

"vehicle_make_name": "TATA_CHAMPION",

"distance_in_km": 27,

"trip_duration_in_hrs": 0,

"total_trips": 2,

"vehicle_charges": 0,

"vehicle_km_charges": 0,

"vehicle_hr_charges": 0

}

],

"details_of_trip_charges": [

{

"reference_number": "EC_1000017",

"planning_hub_code": "EC_1",

"vehicle_number": "DLAB001",

"contract_type": "12hrs_01 days",

"vehicle_make_code": "TATA_CHAMPION",

"distance_in_km": 10,

"per_trip_charges": 0

},

{

"reference_number": "EC_1000018",

"planning_hub_code": "EC_1",

"vehicle_number": "DLAB002",

"contract_type": "per_trip",

"vehicle_make_code": "TATA_CHAMPION",

"distance_in_km": 16,

"per_trip_charges": 600,

"final_price": 600

},

{

"reference_number": "EC_1000019",

"planning_hub_code": "EC_1",

"vehicle_number": "DLAB001",

"contract_type": "12hrs_01 days",

"vehicle_make_code": "TATA_CHAMPION",

"distance_in_km": 13,

"per_trip_charges": 0

},

{

"reference_number": "EC_1000020",

"planning_hub_code": "EC_1",

"vehicle_number": "DLAB002",

"contract_type": "per_trip",

"vehicle_make_code": "TATA_CHAMPION",

"distance_in_km": 11,

"per_trip_charges": 600,

"final_price": 600

},

{

"reference_number": "EC_1000026",

"planning_hub_code": "EC_1",

"vehicle_number": "DLAB001",

"contract_type": "12hrs_01 days",

"vehicle_make_code": "TATA_CHAMPION",

"distance_in_km": 590,

"per_trip_charges": 0

},

{

"reference_number": "EC_1000030",

"planning_hub_code": "EC_1",

"vehicle_number": "DLAB001",

"contract_type": "12hrs_01 days",

"vehicle_make_code": "TATA_CHAMPION",

"distance_in_km": 50,

"per_trip_charges": 0

},

{

"reference_number": "EC_1000032",

"planning_hub_code": "EC_1",

"vehicle_number": "DLAB001",

"contract_type": "12hrs_01 days",

"vehicle_make_code": "TATA_CHAMPION",

"distance_in_km": 50,

"per_trip_charges": 0

},

{

"reference_number": "EC_1000033",

"planning_hub_code": "EC_1",

"vehicle_number": "DLAB001",

"contract_type": "12hrs_01 days",

"vehicle_make_code": "TATA_CHAMPION",

"distance_in_km": 50,

"per_trip_charges": 0

},

{

"reference_number": "EC_1000034",

"planning_hub_code": "EC_1",

"vehicle_number": "DLAB001",

"contract_type": "12hrs_01 days",

"vehicle_make_code": "TATA_CHAMPION",

"distance_in_km": 50,

"per_trip_charges": 0

},

{

"reference_number": "EC_1000036",

"planning_hub_code": "EC_1",

"vehicle_number": "DLAB001",

"contract_type": "12hrs_01 days",

"vehicle_make_code": "TATA_CHAMPION",

"distance_in_km": 19950,

"per_trip_charges": 0

},

{

"reference_number": "EC_1000037",

"planning_hub_code": "EC_1",

"vehicle_number": "DLAB001",

"contract_type": "12hrs_01 days",

"vehicle_make_code": "TATA_CHAMPION",

"distance_in_km": 50,

"per_trip_charges": 0

},

{

"reference_number": "EC_1000038",

"planning_hub_code": "EC_1",

"vehicle_number": "DLAB001",

"contract_type": "12hrs_01 days",

"vehicle_make_code": "TATA_CHAMPION",

"distance_in_km": 50,

"per_trip_charges": 0

},

{

"reference_number": "EC_1000039",

"planning_hub_code": "EC_1",

"vehicle_number": "DLAB001",

"contract_type": "12hrs_01 days",

"vehicle_make_code": "TATA_CHAMPION",

"distance_in_km": 50,

"per_trip_charges": 0

},

{

"reference_number": "EC_1000040",

"planning_hub_code": "EC_1",

"vehicle_number": "DLAB001",

"contract_type": "12hrs_01 days",

"vehicle_make_code": "TATA_CHAMPION",

"distance_in_km": 100,

"per_trip_charges": 0

},

{

"reference_number": "EC_1000041",

"planning_hub_code": "EC_1",

"vehicle_number": "DLAB001",

"contract_type": "12hrs_01 days",

"vehicle_make_code": "TATA_CHAMPION",

"distance_in_km": 100,

"per_trip_charges": 0

},

{

"reference_number": "EC_1000042",

"planning_hub_code": "EC_1",

"vehicle_number": "DLAB001",

"contract_type": "12hrs_01 days",

"vehicle_make_code": "TATA_CHAMPION",

"distance_in_km": 100,

"per_trip_charges": 0

},

{

"reference_number": "EC_1000043",

"planning_hub_code": "EC_1",

"vehicle_number": "DLAB001",

"contract_type": "12hrs_01 days",

"vehicle_make_code": "TATA_CHAMPION",

"distance_in_km": 50,

"per_trip_charges": 0

}

]

}

}

}


Was this article helpful?