# External APIs for vendor Payout

Module: Rates and Contracts
Module slug: rates-and-contracts
Source URL: https://helpcentre.shipsy.io/en-US/shipsy/article/IMrXKypp-external-apis-for-vendor-payout
Article ID: IMrXKypp
Breadcrumbs: Rates and Contracts > Vendor Payout > External APIs for vendor Payout

---
**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](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](/kb-images/external-apis-for-vendor-payout--imrxkypp/img_001_7eac9a6666.png)

The Res Payload will give you the Vendor Payout Id below:![image.png](/kb-images/external-apis-for-vendor-payout--imrxkypp/img_002_54dec65f80.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](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](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

}

]

}

}

}
