Skip to main content

Draw Request

This endpoint posts a list of draw requests to loan accounts. Authorization is required.

HTTP REQUEST

Development

  • POST: https://dev.vendorintegration.growersedge.com/DrawRequest

Production

  • POST: https://vendorintegration.growersedge.com/DrawRequest

Responses

CodeDescription
204No Content
400Bad Request
401Unauthorized
500Internal Server Error
502Bad Gateway

Bad Request Errors

ErrorDecription
Invalid Loan NumberThe provided loan number is incorrect. If you are certain this number is correct, please contact your Growers Edge representative
Invalid AmountThe Amount must be between $1 and the Available Credit remaining for the loan
Invalid Funding InvestorA funding investor has not been correctly assigned for the loan. Please contact your Growers Edge representative
Invalid AuthorizationThe partner identified within the token used does not match the partner associated with the loan
Pending Transaction RequestA Draw Request is pending on loan, as only one draw request can be submitted per day

Post Body

A list of draw request objects following the format below

Property NameTypeDescription
loanNumbernumberThe loan number to apply the payment to
requestorstringThe id of the requestor
amountnumberThe amount paid in dollars

Example of Post Body

[
{
"LoanNumber": 1234,
"Requestor": "John Doe",
"Amount": 500
},
{
"LoanNumber": 4321,
"Requestor": "Jane Doe",
"Amount": 501
}
]

Examples

from azure.identity import CertificateCredential
import requests

TENANT_ID = '***'
CLIENT_ID = '***'
CLIENT_SECRET = '***'
CLIENT_SCOPE = '***'
POST_URL = 'https://vendorintegration.growersedge.com/DrawRequest'

def post( token : str) :
payload = "[{
"LoanNumber": "1234",
"Requestor": "John Doe",
"Amount": 500
}]"

requestResponse = requests.post(
POST_URL,
headers = { 'Authorization' : f'Bearer {token}'},
json= payload
)

if( requestResponse.status_code == 204 ):
return
else:
raise( Exception( 'API Call failed.') )



def main():
credential = ClientSecretCredential( TENANT_ID, CLIENT_ID, CLIENT_SECRET )
access_token = credential.get_token( CLIENT_SCOPE )

print (post(access_token.token))


if __name__ == '__main__':
main()
curl --request POST \
--url https://vendorintegration.growersedge.com/DrawRequest \
--header 'Authorization: Bearer <INSERT YOUR TOKEN>' \
--header 'Content-Type: application/json' \
--data '[{
"LoanNumber": "1234",
"Requestor": "John Doe",
"Amount": 500
}]'