/
Managing Quotas By Supplier

Managing Quotas By Supplier

Overview

For researchers that require explicit supplier blends by quota, we offer the capability to manage quotas by supplier.

Use

Quotas by supplier can be set through the POST and PUT /surveys/:surveyId/quotas endpoint. It is not possible to set quotas by supplier during the POST /surveys stage because a supplier list is not actively applied yet to this survey.

Important Considerations

  • These endpoints may only be used after a draft survey has been created

  • Once a supplier has been added to a survey, their supplier id will always appear within the survey/quota. If you do not desire sample from a specific supplier, set their allocation to 0 in Managing Suppliers for a Survey

    • If a supplier id is omitted in the request, then the application will assume that their allocation for a quota is 0.

  • Suppliers that are grouped together will appear as a single supplier in the quotas by supplier view. You must use the supplier group name when setting up this supplier.

Adding suppliers that are not present in the survey’s supplier list will result in a failed request. The API will return an HTTP status code 400 in these cases.

Request


POST $apihost/$basepath/surveys/:surveyId/quotas?QBS=1

($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) 

{ "buyer_quota_id": "qb30", "required_count": 200, "suppliers": [ { "supplier_ref_id": "1", "current_target": 50 }, { "supplier_ref_id": "3", "current_target": 150 }, { "supplier_ref_id": "abc", "current_target": 150 } ], "criteria": [ { "qualification_code": 214, "condition_codes": [ "112" ] } ] }

Here abc as supplier_ref_id denotes to supplier group reference id and numeric supplier_ref_idlike 1 and 3 represents to the individual suppliers

Result 


Response Code

200

Response Body

{ "buyer_quota_id": "qb30", "required_count": 200, "suppliers": [ { "supplier_ref_id": "1", "current_target": 50 }, { "supplier_ref_id": "3", "current_target": 150 }, { "supplier_ref_id