Reconciliation via API (Accept)
Our updated BUY API documentation is available here.
We hope you enjoy the new experience! Reach out to us with your feedback or questions on supportbuyapi@purespectrum.com
Happy programming! 🎉
PRODUCTION API ENDPOINTS Recap:
Single survey:
POST: https://api.spectrumsurveys.com/buyers/v2/adjustments/surveys/{surveyId}
Multiple Survey:
POST: https://api.spectrumsurveys.com/buyers/v2/adjustments($apihost is the environment against which you are testing, and $basepath is the base path with the api version. All Buy API calls will require access-token parameter in the header)
STAGING API, Payload and Info:
1 - Reconciliation Single Survey:
Buyer API Endpoint:
POST : https://staging.spectrumsurveys.com/buyers/v2/adjustments/surveys/{surveyId}
API: POST
Access-token: Buyer accountRequest Payload:
[
{
"transaction_id": "7lNK5AGrSL3bk5tV4gw0Tr"
},
{
"transaction_id": "7dTdSUUWkR9DBs7rUi5jdT"
},
{
"transaction_id": "5EmEbeX9mEblEpwP6yHG1K"
},
{
"transaction_id": "6HkYQWFMcIcDOTxfnIi6op"
}
]
Response:
Response Code:
CODE: 202 ACCEPTED
Response Code (deprecated):
CODE: 200 OK
Response Body:
{
"adjustment_id": "b43ce6a3-9578-4ba6-8cc5-a4add094a352",
"statusDescription": "Pending",
"status": 1,
"summary": {
"transactions": 4,
"eligible": 4,
"completes": 1,
"rejected": 0,
"ineligibleReconcap": 0
}
}
2 - Reconciliation multiple surveys (Bulk Reconciliation)
Buyer API Endpoint:
POST : https://staging.spectrumsurveys.com/buyers/v2/adjustments
API:POST
Access-token:Buyer accountRequest Payload:
[
{
"transaction_id": "7by1JwD0oLzX1iip0liui4"
},
{
"transaction_id": "7Er50MDCnV0b0bc91S8Qr1"
},
{
"transaction_id": "41JBHVbfHas8kzAwYhGW9l"
},
{
"transaction_id": "7mwVC728181yok8mKgDzQv"
},
{
"transaction_id": "21NJOoeCB4mXoMZXg77bNo"
},
{
"transaction_id": "5j2UOEpgsMlXoLix0qtU0W"
}
]
Response:
Response Code:
CODE: 202 ACCEPTED
Response Code (deprecated):
CODE: 200 OK
Response Body:
{
"adjustment_id": "46e10177-c3a3-4246-a33a-0c8306f3a9a6",
"statusDescription": "Pending",
"status": 1,
"summary": {
"transactions": 6,
"eligible": 6,
"completes": 0,
"rejected": 2,
"ineligibleReconcap": 0
}
}NOTE 1: The system always records any Reconciliation process made via API or UI and this information can be find on the Survey dashboard → Reconciliation Tab
These are the label show:
Reject : Reconciliation via UI - TX changes to
buyer_rejectsReject (API): Reconciliation via API - TX changes to
buyer_rejectsComplete: Reconciliation via UI - TX changes to
completeComplete (API): Reconciliation via UI - TX changes to
buyer_rejectsAccept: Reconciliation via UI - Any TX in the file will changes to
completeif they are eligible, and the TX current completes not in the file, will changebuyer_rejectsAccept (API): Reconciliation via API - Any TX in the file will changes to
completeif they are eligible, and the TX current completes not in the file, will changebuyer_rejects
NOTE 2: Status of the Reconciliation
Pending — The file/request is correctly uploaded and is waiting to process
Declined (User terminated) — The user has not confirmed the reconciliation and aborted the reconciliation by clicking the cancel button. Only available via UI.
Message In Flight — The file/request is correctly uploaded/sent, and the system has sent the request to a lambda server
Processing — The file/request is correctly uploaded and the system has started the reconciliation process
Error In Processing — The system couldn’t finish the reconciliation. Need to resend the file/request.
Success — The file/request has been successfully processed
Upload Interrupted — The file/request was in pending status for more than 30 minutes and the file hasn’t been processed. The user must upload the file again.
Recon Cap Reached — The file/request is correctly uploaded but the system rejected it due to the reconciliation cap. The number of reconciliations requested is over the limit
Waiting for a running process—The file/request is in the queue and will attempt reconciliation five times. It will be in a queue only when multiple requests for the same survey ID are made.
Success (Partial) — The file/request has been successfully processed for some surveys but some may have reached their cap.
NOTE 3: If you need to test the Reconciliation API and want to create some test transactions, please ask your account manager or contact the PureSpectrum product team. They will give you access to a document that allows you to create a transaction via API.
NOTE 4: 10 pm PT is the absolute latest you can submit a reconciliation for it to be included in the next month’s invoice.