Reference API Reference Pull Order API The Pull order API will allow us in fetching the already existing order in the system.
Pull Order.
POST
https://<sub domain>.kapturecrm.com/ms/customer-search/order-search/api/v1/pull-internal
Copy NOTE: Please replace with your sub domain name in the API.
Authentication:
TTo access this API endpoint, you need to include your user name and password in the Authorization header. For authentication, use the following header, which will help you generate your Basic Auth token:
Request Body
The request body should be a JSON object containing the list of the orders existing in the system. Here are the list of parameters.
Note: Atleast one of the value must be entered out of name, enquiryIds, generationStartDate, generationEndDate, nextFollowupStartDate, nextFollowupEndDate, lastFollowupStartDate, lastFollowupEndDate, expectedClosureStartDate, expectedClosureEndDate, customerIds, statusStr, subStatusStr, creatorOrAssignedIdStr, assignToIdsStr, creatorIdStr, notAssignToIdsStr, country, city, state, leadPriorityStr, secondarySourceId, clientReferenceIds, approvedIds, pricingStatus, attr1, attr2, attr3, attr4, attr5, attr6, attr7, attr8, attr9, attr10, attr11, attr12, attr13, attr14, attr15
Name
Mandatory
Type
Description
Indicates the unique account Id
Kapture generated unique customer id against which the update of information is needed.
Body Request
Copy {
"cmId": 1000298, //Required field, value must be > 0.
"name": "",
"phone": "",
"email": "",
"customerIds": "191696570",
"leadIdStr": "",
"enquiryIds": "",
"clientReferenceIds": "",
"attr1": "",
"attr2": "",
"attr3": "",
"attr4": "",
"attr5": "",
"attr6": "",
"attr7": "",
"attr8": "",
"attr9": "",
"attr10": "",
"attr11": "",
"attr12": "",
"attr13": "",
"attr14": "",
"attr15": "",
"viewId": "2",
"orderIds": "",
"erpOrderId": "",
"createStartDate": "",
"createEndDate": "",
"bookingStatus": "",
"bookingSubStatus": "",
"bookingStartDate": "",
"bookingEndDate": "",
"creatorIdStr": "",
"assignIdStr": "",
"zoneIdStr": "",
"blockId": "",
"unitId": "",
"approvalDesignationIds": "",
"agreementStartDate": "",
"agreementEndDate": "",
"erpInvoiceId": "",
"sortParam": "",
"limit": "",
"offset": ""
}
Please map in the request body if there's any extra associate body according to your use case.
Response Body
The API responds with a JSON object containing the details of the added order against the customer. If successful, the response will include the customer ID, order ID and the other relevant information.
Response
Response Messages
{ ..., "status": "success"}
List of customers fetched successfully.
{"message": "Invalid Auth Key","status": "failed"}
Authorization key is either not passed in header, or incorrect, or expired/disabled
Response
Copy {
"success": "true",
"order_details": [
{
"id": 23518265,
"cmId": 1000298,
"customerId": 191696570,
"enquiryId": 24284201,
"createDate": 1715149492000,
"creatorId": 209803,
"productQuantity": 0,
"productValue": 0,
"discount": 0,
"remarks": "testing",
"deliveryStatus": "AP",
"lastModificationTime": 1715149492000,
"unitId": 0,
"blockId": 0,
"zoneId": 0,
"basePrice": 0,
"serviceTax": 0,
"bookingAmount": 0,
"retainerFrequency": 0,
"retainerAmount": 0,
"subOfficeId": 0,
"retainerCreditPeriod": 0,
"parentOrderId": 0,
"assignedToId": 209803,
"invoiceSent": false,
"commissionAmount": 0,
"totalSaleableArea": 0,
"builderInvoiceId": 0,
"enquiryAssignedTo": 0,
"sellingPrice": 0,
"cess": 0,
"extraCharges": 0,
"warrantyInDays": 0,
"parentCustomerId": 0,
"checkedIn": false,
"includeInterest": false,
"channelId": 0,
"deliveredOrderId": 0,
"commissionPaidAmount": 0,
"onwardCruiseId": 0,
"returnCruiseId": 0,
"approvedByEmployeeId": 0,
"vatamount": 0
}
]
}
Error Codes
Bad Request - Invalid parameters or missing data
Unauthorized - Invalid or missing API key
Forbidden - Insufficient permissions
Not Found - Resource or endpoint not found
Internal Server Error - Server-side issue
Example of a working curl
cURL Python Node.js
Copy curl --location --request GET 'https://devapi.kapturecrm.com/ms/customer-search/order-search/api/v1/pull-internal' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <Your Token>' \
--header 'Cookie: JSESSIONID=; _KAPTURECRM_SESSION=' \
--data '{
"cmId": 1000298,
"name": "",
"phone": "",
"email": "",
"customerIds": "191696570",
"leadIdStr": "",
"enquiryIds": "",
"clientReferenceIds": "",
"attr1": "",
"attr2": "",
"attr3": "",
"attr4": "",
"attr5": "",
"attr6": "",
"attr7": "",
"attr8": "",
"attr9": "",
"attr10": "",
"attr11": "",
"attr12": "",
"attr13": "",
"attr14": "",
"attr15": "",
"viewId": "2",
"orderIds": "",
"erpOrderId": "",
"createStartDate": "",
"createEndDate": "",
"bookingStatus": "",
"bookingSubStatus": "",
"bookingStartDate": "",
"bookingEndDate": "",
"creatorIdStr": "",
"assignIdStr": "",
"zoneIdStr": "",
"blockId": "",
"unitId": "",
"approvalDesignationIds": "",
"agreementStartDate": "",
"agreementEndDate": "",
"erpInvoiceId": "",
"sortParam": "",
"limit": "",
"offset": ""
}'
Copy import requests
import json
url = "https://devapi.kapturecrm.com/ms/customer-search/order-search/api/v1/pull-internal"
payload = json.dumps({
"cmId": 1000298,
"name": "",
"phone": "",
"email": "",
"customerIds": "191696570",
"leadIdStr": "",
"enquiryIds": "",
"clientReferenceIds": "",
"attr1": "",
"attr2": "",
"attr3": "",
"attr4": "",
"attr5": "",
"attr6": "",
"attr7": "",
"attr8": "",
"attr9": "",
"attr10": "",
"attr11": "",
"attr12": "",
"attr13": "",
"attr14": "",
"attr15": "",
"viewId": "2",
"orderIds": "",
"erpOrderId": "",
"createStartDate": "",
"createEndDate": "",
"bookingStatus": "",
"bookingSubStatus": "",
"bookingStartDate": "",
"bookingEndDate": "",
"creatorIdStr": "",
"assignIdStr": "",
"zoneIdStr": "",
"blockId": "",
"unitId": "",
"approvalDesignationIds": "",
"agreementStartDate": "",
"agreementEndDate": "",
"erpInvoiceId": "",
"sortParam": "",
"limit": "",
"offset": ""
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic <Your Token>',
'Cookie': 'JSESSIONID=; _KAPTURECRM_SESSION='
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Copy var request = require('request');
var options = {
'method': 'GET',
'url': 'https://devapi.kapturecrm.com/ms/customer-search/order-search/api/v1/pull-internal',
'headers': {
'Content-Type': 'application/json',
'Authorization': 'Basic <Your Token>',
'Cookie': 'JSESSIONID=; _KAPTURECRM_SESSION='
},
body: JSON.stringify({
"cmId": 1000298,
"name": "",
"phone": "",
"email": "",
"customerIds": "191696570",
"leadIdStr": "",
"enquiryIds": "",
"clientReferenceIds": "",
"attr1": "",
"attr2": "",
"attr3": "",
"attr4": "",
"attr5": "",
"attr6": "",
"attr7": "",
"attr8": "",
"attr9": "",
"attr10": "",
"attr11": "",
"attr12": "",
"attr13": "",
"attr14": "",
"attr15": "",
"viewId": "2",
"orderIds": "",
"erpOrderId": "",
"createStartDate": "",
"createEndDate": "",
"bookingStatus": "",
"bookingSubStatus": "",
"bookingStartDate": "",
"bookingEndDate": "",
"creatorIdStr": "",
"assignIdStr": "",
"zoneIdStr": "",
"blockId": "",
"unitId": "",
"approvalDesignationIds": "",
"agreementStartDate": "",
"agreementEndDate": "",
"erpInvoiceId": "",
"sortParam": "",
"limit": "",
"offset": ""
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
Last updated 10 months ago