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.

Important Considerations

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": null,
        "group_name": null,
        "completes_goal": 25,
        "remaining": 100,
        "fielded": 0,
        "cpi": 33.42,
        "last_start_date": "",
        "intent": {
            "intent_value": 0
        },
        "suppliers": [
            {
                "id": 3,
                "name": "Supplier 3"
            }
        ]
    },
    {
        "group_ref": null,
        "group_name": null,
        "completes_goal": 25,
        "remaining": 100,
        "fielded": 0,
        "cpi": 12,
        "last_start_date": "",
        "intent": {
            "intent_value": 0
        },
        "suppliers": [
            {
                "id": 1,
                "name": "Supplier 1"
            }
        ]
    }
]