POST Place Order
Base URLs
Demo URL: https://demoapi.openletterconnect.com/api/v1
Production URL: https://api.openletterconnect.com/api/v1
{{base_url}}/orders
Description
This endpoint is used to place a new order in the system. You can specify multiple contacts, product details, and a return address. The API will return a confirmation message indicating that the order has been created successfully, along with the order details.
Available Options for Sending Receiver Data:
1: Contacts as an Array of Objects (currently shown in the payload):
"contacts": [
{
"firstName": "Michael",
"lastName": "Smith",
"address1": "123 Elm Street",
"city": "Raleigh",
"state": "NC",
"zip": "27601"
}
]
2: Contact IDs as an Array:
"contactIds": [1, 2, 3]
3: Tag as an Integer (ID of tag):
"tag": 12345
4: reqId as a String (if a CSV file was uploaded previously):
"reqId": "069b3a84-cd74-4e00-b2ef-9d5e1ff57dfa"
AUTHORIZATION
Bearer Token
- Token:
{{jwt_token}}
Body Raw
{
"contacts": [
{
"firstName": "Michael",
"lastName": "Smith",
"address1": "123 Elm Street",
"address2": "Suite 456",
"companyName": "TechCorp",
"city": "Raleigh",
"state": "NC",
"zip": "27601",
"propertyAddress": "123 Elm Street",
"propertyCity": "Raleigh",
"propertyState": "NC",
"propertyZip": "27601",
"custom_field_1": "Custom Value 1",
"custom_field_2": "Custom Value 2",
"campaign_phone": "919-555-7890",
"meta_data": {
"account_id": "account of Michael Smith"
}
},
{
"firstName": "Michael",
"lastName": "Smith",
"address1": "123 Elm Street",
"address2": "Suite 456",
"companyName": "TechCorp",
"city": "Raleigh",
"state": "NC",
"zip": "27601",
"propertyAddress": "123 Elm Street",
"propertyCity": "Raleigh",
"propertyState": "NC",
"propertyZip": "27601",
"custom_field_1": "Custom Value 1",
"custom_field_2": "Custom Value 2",
"campaign_phone": "919-555-7890",
"meta_data": {
"account_id": "account of Michael Smith"
}
},
{
"firstName": "Michael",
"lastName": "Smith",
"address1": "123 Elm Street",
"address2": "Suite 456",
"companyName": "TechCorp",
"city": "Raleigh",
"state": "NC",
"zip": "27601",
"propertyAddress": "123 Elm Street",
"propertyCity": "Raleigh",
"propertyState": "NC",
"propertyZip": "27601",
"custom_field_1": "Custom Value 1",
"custom_field_2": "Custom Value 2",
"campaign_phone": "919-555-7890",
"meta_data": {
"account_id": "account of Michael Smith"
}
},
{
"firstName": "Michael",
"lastName": "Smith",
"address1": "123 Elm Street",
"address2": "Suite 456",
"companyName": "TechCorp",
"city": "Raleigh",
"state": "NC",
"zip": "27601",
"propertyAddress": "123 Elm Street",
"propertyCity": "Raleigh",
"propertyState": "NC",
"propertyZip": "27601",
"custom_field_1": "Custom Value 1",
"custom_field_2": "Custom Value 2",
"campaign_phone": "919-555-7890",
"meta_data": {
"account_id": "account of Michael Smith"
}
},
{
"firstName": "Michael",
"lastName": "Smith",
"address1": "123 Elm Street",
"address2": "Suite 456",
"city": "Raleigh",
"state": "NC",
"zip": "27601",
"custom_field_1": "Custom Value 1",
"custom_field_2": "Custom Value 2",
"campaign_phone": "919-555-7890",
"meta_data": {
"account_id": "account of Michael Smith"
}
}
],
"productId": 13,
"templateId": 154,
"name": "Latest Order for local environment",
"returnAddress": {
"firstName": "Michael",
"lastName": "Smith",
"address1": "123 Elm Street",
"address2": "Suite 456",
"city": "Raleigh",
"state": "NC",
"zip": "27601",
"websiteUrl": "https://website.com",
"phoneNo": "090078601",
"email": "[email protected]",
"propertyAddress": "1712 Royalsborough Rd",
"propertyCity": "DurhamW",
"propertyState": "MEW",
"propertyZip": "042222",
"meta_data": {
"account_id": "account of Michael Smith"
}
},
"returnAddressSettings": {
"firstName": false,
"lastName": true,
"companyName": true,
"fullAddress": true
},
// returnAddressSettings is an optional field. If not provided, the system will use the user's general settings.
// By default, the general settings have all fields set to true (firstName, lastName, companyName, fullAddress).
// The user can override these settings as needed.
// Options:
// - firstName: true/false (Include or exclude user's first name in the return address)
// - lastName: true/false (Include or exclude user's last name in the return address)
// - companyName: true/false (Include or exclude user's company name in the return address)
// - fullAddress: true/false (Include or exclude user's full address in the return address)
"crmMode": "zapier",
"rosOfferPercentage": 65
// The rosOfferPercentage field is mandatory only if the selected template includes ROS field.
// If the template does not include ROS field, a random value between 0 and 100 will be automatically assigned to rosOfferPercentage.
// Ensure that the rosOfferPercentage value is a numeric type and falls within the range of 0 to 100.
}
Example Request
curl --location -g '{{base_url}}/orders' \
--data '{
"productId": 13,
"templateId": 4,
"deliveryDate": "Next Friday",
"returnAddress": null,
"tag": -1
}'
Example Response
{
"message": "Order Created Successfully",
"data": {
"id": "10",
"orgId": "3",
"batchId": null,
"returnContactId": null,
"templateUrl": "https://api.openletterconnect.com/api/v1/download/s3/openletterconnect/org-3/user-4/templates/upload/json/1706208524782-template.json",
"expectedDeliveryDate": null,
"mergeVariables": {},
"status": "On Hold",
"meta": {},
"isLiveMode": true,
"createdBy": "4",
"source": "OLC Client",
"cost": 4.050000000000001,
"paymentStatus": "Pending",
"creator": null
}
}