By Attribute
Introduction
This operation returns a list of submissions that match the search criteria for the BPID provided.
Method | Service | API Name | Service Type |
---|---|---|---|
POST | submissions | findbyattribute → Explore | Synchronous |
URI: {baseUrl}/submissions/v1/findbyattribute/{BPID}
This API does not return the status of the submissions themselves. Once you have obtained the tracking numbers and campaign codes you will need to use the TrackSubmissionByTrackingNumber API to fetch the submission status information.
Header Elements
The header must contain the elements needed to authenticate the request.
Parameter | Description | Type | Required |
---|---|---|---|
authorization | This is where you will send your encoded JWT auth token you obtained from Get Auth Token. Must be in the form: Authorization: Bearer {auth-token-string} | String | Yes |
Request Elements
The following query parameters are supported in the request.
Name | Description | Type | Required |
---|---|---|---|
attributeName | The name of the submission attribute to be searched. | String | Yes |
attributeValue | The value for the attribute you want to find. | String | Yes |
Request Sample
URI: https://certification.promob2b.bhnapi.com/submissions/v1/findbyattribute/12345
{
"attributeName": "AccountNumber",
"attributeValue": "1234567890"
}
Response
Response Elements
Name | Description | Type | Required |
---|---|---|---|
timestamp | Timestamp when the request completed processing. | Integer | Yes |
status | Status of the response. This will match the HTTP Status Code in the header of the response. Example: 404 | String | Yes |
error | If the request was not processed successfully this will indicate the error condition encountered. Example: "Not Found" | String | Yes (if status is ERROR ) |
message | The detailed error message. This will be null if the request completed successfully. Example: "Campaign Code 32-99999 could not be found" | String | Yes (if status is ERROR ) |
path | The path called in the request excluding the baseUrl. | String | Yes |
trackDetails | The information about the submissions associated to the search terms that were found in Hawk Redeem for the BPID provided. | Array of JSON Objects | Yes |
Track Details
Name | Description | Type | Required |
---|---|---|---|
trackingNumber | The tracking number for the submission | String | Yes |
campaignCode | The campaign code for the submission. | String | Yes |
campaignShortName | The short name for the campaign matching the campaign code for the submission. | String | Yes |
submissionSubmitDate | This is the postmark date on submission, if not present then it is the submission insert date | String | Yes |
Response Sample
{
"status": 200,
"error": null,
"message": "",
"path": "/submissions/v1/findbyattribute/12345",
"timestamp": 1637166296307,
"correlationId": "1-61952cd7-39e5ceec68cda96d04020258",
"submissionDetails": [
{
"trackingNumber": "100319219",
"campaignCode": "32-12345",
"campaignShortName": "Park Rebate",
"submissionSubmitDate": "09/01/2021"
},
{
"trackingNumber": "100178433",
"campaignCode": "32-12857",
"campaignShortName": "Move-in Special",
"submissionSubmitDate": "08/31/2021"
},
{
"trackingNumber": "115523350",
"campaignCode": "32-65155",
"campaignShortName": "Corporate Escalations",
"submissionSubmitDate": "12/12/2021"
}
]
}
{
"status": 200,
"error": null,
"message": "No submissions were found matching the search criteria provided",
"path": "/submissions/v1/findbyattribute/12345",
"timestamp": 1637165965600,
"correlationId": "1-61952b8d-4aa8ceb651a467127389adc9",
"submissionDetails": null
}
{
"status": 400,
"error": "Bad Request",
"message": "Invalid required fields from the request. Please verify and try again.",
"path": "/submissions/v1/findbyattribute/12345",
"timestamp": 1637166058345,
"correlationId": "1-61952bea-7be15ce23f40121f06fe3747",
"submissionDetails": null
}
{
"timestamp": 1637166238036,
"status": 400,
"error": "Bad Request",
"message": "JSON parse error: Unexpected character ('\"' (code 34)): was expecting comma to separate Object entries; nested exception is com.fasterxml.jackson.core.JsonParseException: Unexpected character ('\"' (code 34)): was expecting comma to separate Object entries\n at [Source: (PushbackInputStream); line: 3, column: 6]",
"path": "/submissions/v1/findbyattribute/12345"
}
Updated over 3 years ago