GET Get Order History
Base URLs
Demo URL: https://demoapi.openletterconnect.com/api/v1
Production URL: https://api.openletterconnect.com/api/v1
{{base_url}}/orders/?page=0&pageSize=10&meta.account_id=123-1234-12342355-12323534634
Description
This endpoint is used to retrieve the order history from the system. It allows you to filter the results based on pagination parameters, such as the current page number and the number of items per page. Additionally, you can filter the results by various parameters provided with the prefix meta.
, including account_id
. These parameters must be set during the creation or updating of the model. The response includes details about each order, including product information, contact details, and the status of the orders.
AUTHORIZATION
Bearer Token
- Token:
{{jwt_token}}
PARAMS
Name | Data Type | Required | Description |
---|---|---|---|
page | integer | Yes | The current page number for pagination. |
pageSize | integer | Yes | The number of items per page. |
meta.account_id | string | No | A unique identifier for the account, set by the user based on their choice. |
search | string | No | Search term to filter by order ID or order name (available after the current sprint's release). |
productTypes | string | No | Filter by product types. |
sources | string | No | Filter by sources. |
orderStatus | string | No | Filter by order status. |
paymentStatus | string | No | Filter by payment status. |
createdDate | string | No | Filter by the date the order was created. |
scheduledDate | string | No | Filter by the scheduled date. |
processingDate | string | No | Filter by the processing date. |
createdBy | string | No | Filter by the user ID who created the order. |
Example Request
curl --location -g '{{base_url}}/orders/?page=0&pageSize=10'
Example Response
{
"message": "Success",
"data": {
"count": 1,
"rows": [
{
"id": "10",
"orgId": "1",
"fileUrl": null,
"mergeVariables": [],
"status": 10,
"meta": {},
"isLiveMode": false,
"campaign": {
"id": "2",
"name": "One-off order",
"description": "This is a one-off order",
"scheduleType": "immediate",
"useType": null,
"deliveryDate": null,
"campaignType": "one-off order"
},
"product": {
"id": "1",
"paperType": "60# Statement",
"paperSize": "8.5x11",
"deliveryType": "First Class",
"productType": "Professional letters",
"envelopeType": "#10 Double-Window",
"postageType": "Indicia",
"name": "Professional Letters, First Class",
"meta": null
},
"contacts": [
{
"id": "28",
"orderId": "10",
"trackingCode": null,
"contact": {
"id": "1",
"zip": "62704",
"city": "Springfield",
"email": "[email protected]",
"phoneNo": "217-555-1234",
"address1": "1234 Random Street, Suite 567",
"address2": "Springfield, IL 62704",
"fullName": "Alex Brown",
"lastName": "Brown",
"firstName": "Alex",
"websiteUrl": "https://techcorp.com",
"companyName": "TechCorp"
},
"isDelivered": false,
"status": null,
"meta": {}
},
{
"id": "29",
"orderId": "10",
"trackingCode": null,
"contact": {
"id": "2",
"zip": "62704",
"city": "Springfield",
"email": "[email protected]",
"phoneNo": "217-555-1234",
"address1": "1234 Random Street, Suite 567",
"address2": "Springfield, IL 62704",
"fullName": "Alex Brown",
"lastName": "Brown",
"firstName": "Alex",
"websiteUrl": "https://techcorp.com",
"companyName": "TechCorp"
},
"isDelivered": false,
"status": null,
"meta": {}
},
{
"id": "30",
"orderId": "10",
"trackingCode": null,
"contact": {
"id": "3",
"zip": "62704",
"city": "Springfield",
"email": "[email protected]",
"phoneNo": "217-555-1234",
"address1": "1234 Random Street, Suite 567",
"address2": "Springfield, IL 62704",
"fullName": "Alex Brown",
"lastName": "Brown",
"firstName": "Alex",
"websiteUrl": "https://techcorp.com",
"companyName": "TechCorp"
},
"isDelivered": false,
"status": null,
"meta": {}
}
],
"template": {
"id": "8",
"title": "My Template 3",
"templateUrl": "https://api.openletterconnect.com/api/v1/s3/openletterconnect/org-1/user-1/templates/upload/json/1701792981367-template.json",
"templateType": "json",
"thumbnailUrl": "https://api.openletterconnect.com/api/v1/s3/openletterconnect/org-1/user-1/templates/upload/thumbnail/1701775937282-logo.png",
"creator": {
"id": "2",
"fullName": "Alex Brown"
}
}
}
]
}
}