Not yet available in Staging or Production. API specs subject to change.
Overview
Every survey in PureSpectrum has a list of suppliers that send sample. You may update the list of suppliers, and their goal, using this API endpoint
Use
This API endpoint may be used to update a survey’s supplier list by updating a supplier’s “completes_required”, or by grouping suppliers together.
To “remove” a supplier - set their “completes_required” to 0.
Supplier allocations may add up to more than or less than 100% of the survey’s goal.
To set “flexibility” among suppliers, set the “completes_goal” values to be in excess of the survey’s goal.
To pace the flexibility among suppliers, set the “completes_goal” values to be less than the survey’s goal.
Important Considerations
This endpoint may only be used after a draft survey has been created
By default, all valid non-blocked suppliers in a locale are added to the survey upon creation. To update/remove suppliers, either omit their supplier ID from this endpoint, or set their “completes_required” to 0.
Suppliers can not be removed from a survey, though their allocations can be set to 0.
Request
PUT $apihost/$basepath/surveys/:surveyId/suppliers
($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)
Request:
PUT $apihost/$basepath/surveys/:surveyId/suppliers
[ { "cpi": 33.42, "completes_goal" : 25, "suppliers": [3] }, { "cpi": 12, "completes_goal" : 25, "suppliers": [1] } ]
Result
Response Code
200
Response Body
[ { "group_ref": "abc", "group_name": "PS suppliers", "completes_goal": 100, "remaining": 100, "fielded": 0, "cpi": 6, "intent": { "intent_value": null, "intent_not_set": [ 1, 23 ], "intent_denied": [], "intent_accepted": [] }, "suppliers": [ { "id": 1, "name": "Say For Example" }, { "id": 23, "name": "PureSpectrum Sample Reserve" } ], "performance": [ { "name": "PS_Side_In_Progress", "count": 2, "percentage_of_supplier_total": 22, "supplier_share_status": 100 }, { "name": "PS_Termination_Core", "count": 1, "percentage_of_supplier_total": 11, "supplier_share_status": 100 }, { "name": "Complete", "count": 6, "percentage_of_supplier_total": 66, "supplier_share_status": 75 } ], "valid_clicks": 6, "valid_click_cost": 3.5, "valid_click_percentage": 67, "total_click_cost": 2.33 }, { "group_ref": null, "group_name": null, "completes_goal": 100, "remaining": 100, "fielded": 0, "cpi": 4, "last_start_date": "", "intent": { "intent_value": 0 }, "suppliers": [ { "id": 16, "name": "Peanut Labs" } ] } ] |
Add Comment