Skip to content

Posting an Order

Posting an Order

POST Endpoint:

https://org-api.deedraft.com/api/live-orders

Request Body:

amount: int;
considerationPrice: int;
description: string; # (optional)
firstPartyAddress: string;
firstPartyMobileNumber: string;
firstPartyName: string;
firstPartyPan: string; # (optional)
paidBy: string; # "First Party" | "Second Party"
purpose: string;
secondPartyAddress: string;
secondPartyName: string;
secondPartyPan: string; # (optional)
state: string;
purchasedBy: string; # (optional)

Example Response:

{
"message": "Successfully created the order!",
"orderId": "<order-id>"
}
  • Purpose and state must exist: We look up the combination of purpose and state. If not found, the request fails.
  • When the purpose follows consideration price (toFollowConsiderationPrice):
    • considerationPrice must be > 0.
    • amount is calculated by the server as: considerationPrice * amountPercentConsideration, then clamped to the allowed range. If the purpose has a fixed amount, that fixed value is used as both min and max.
  • When the purpose does NOT follow consideration price:
    • If the purpose has a fixed amount, your amount must equal that fixed value.
    • If the purpose has a range (min/max), your amount must be within that range (inclusive).
  • Type validation: All fields are type-checked. Invalid types or missing required fields will result in a 400 Bad Request with details.
FieldTypeRequiredConstraintsAllowed Characters
amountintYes>= 0N/A
considerationPriceintYes>= 0, max 15 digitsN/A
descriptionstringNoMax 100 chars, defaults to “N/A” if emptyAlphanumeric, spaces, ! # @ $ * ( ) - + ; : , . ? /
purposestringYesMin 1 char after trimAll characters (from purposes config)
paidBystringYesMust be exactly “First Party” or “Second Party”N/A
purchasedBystringNoNo constraints, defaults to emptyAll characters
firstPartyMobileNumberstringYesExactly 10 digitsNumeric (0-9) only
firstPartyName, secondPartyNamestringYesMin 1, max 40 charsAlphanumeric + spaces only
firstPartyAddress, secondPartyAddressstringYesMin 1, max 120 charsAlphanumeric, spaces, . / : , - \
firstPartyPan, secondPartyPanstringNoValid PAN format or empty, defaults to emptyEither empty OR uppercase letters/digits in format: AAAAA0000A (5 letters, 4 digits, 1 letter)
statestringYesMust match predefined state enumN/A

For more details on available purposes and their configuration (fixed/min/max, percentage), see the Organization portal: Article List.

If any validation fails, the API returns an appropriate error message with a status code of 4xx.

StatusWhen it happensExample message
200Order created successfullySuccessfully created the order!
400Invalid input schema or typesInvalid data. plus details per field
400Purpose follows consideration price but considerationPrice <= 0Consideration price is required to be greater than 0 for the selected purpose. Please provide a valid consideration price.
400Purpose has fixed amount and provided amount differsThe purpose have a fixed amount of: <fixed>, while the amount passed is equal to: <amount>
400Purpose has range and provided amount is out of boundsThe purpose can take an amount in the range of: <min>-<max>, while the amount passed is equal to: <amount>
403User is not authenticated (Bearer token not provided)ForbiddenError
404Purpose/state combination not foundPurpose with the name: <purpose> cannot be found.
Terminal window
curl -X POST https://org-api.deedraft.com/api/live-orders \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your-token>" \
-d '{
"amount": 1000,
"considerationPrice": 1200,
"description": "Sample Order",
"firstPartyAddress": "123 Street",
"firstPartyMobileNumber": "9876543210",
"firstPartyName": "John Doe",
"firstPartyPan": "ABCDE1234F",
"paidBy": "First Party",
"purpose": "Loan Agreement [5(d)]",
"secondPartyAddress": "456 Avenue",
"secondPartyName": "Jane Smith",
"secondPartyPan": "XYZAB9876P",
"state": "Rajasthan",
"purchasedBy": "John Doe"
}'