Method sets quota type for portal.
To set quotas you need to POST data parameter containing an xml. XML should contain quotas type and additional parameters related to it.
Quotas type can be either slots or period:
- For
slotsavailable parameters are:-
budget-type- optional; period for which the budget is allocated. Possible values are:month- every month of using the job board costs as much asbudget-amountindicates.year- every year of using the job board costs as much asbudget-amountindicates.
-
budget-amount- optional; the available budget (decimal). -
slots-available- optional; the amount of slots (integer).
-
- For
periodavailable parameters are:period- quotas period. Possible values are:WeekMonthQuarterYear
base- How to deduct posting credits?. Possible values are:Post- Use only one posting credit no matter how long the job is posted out for.Week- Use up a posting credit for every week the job is posted out.reset- What to do when the quotas reset. Possible values are:Ignore- Ignore any unused quota.Carry- Carry over unused quota to the next period.
month-renewal- mandatory only ifperiodis Month. Value should be in 2-digit format and should represent a day of month. Examples: 01, 05, 11, 29, 31.year-renewal- mandatory only ifperiodis Year. Value should be indd-mmformat, wheredd- 2-digit number representing a day,mm- 2-digit number representing a month.budget-type- optional; period for which the budget is allocated. Possible values are:payperpost- each post costs as much asbudget-amountindicates.month- every month of using the job board costs as much asbudget-amountindicates.year- every year of using the job board costs as much asbudget-amountindicates.
budget-amount- optional; if, for the particular portal, there exists an Extra Field with different types of credits, the cost can be set for eachoption:label- name of the credit type - obtainable via quota-settings-for-specified-portal.value- the actual cost for this credit type.
Parameters
No additional parameters
Example
Posted data
POST https://ws.idibu.com/ws/rest/v1/quotas/517/new?hash=YOUR_HASH
<?xml version="1.0" encoding="utf8"?>
<idibu>
<type>period</type>
<period>Month</period>
<base>Post</base>
<month-renewal>05</month-renewal>
<year-renewal/>
<reset>Carry</reset>
<budget-type>payperpost</budget-type>
<budget-amount>
<option>
<label>Standard job</label>
<value>2700</value>
</option>
<option>
<label>Premium job</label>
<value>13</value>
</option>
<option>
<label>Default ad</label>
<value>2.20</value>
</option>
</budget-amount>
</idibu>
Response
<?xml version="1.0" encoding="utf8"?>
<idibu generator="idibu" version="1.0">
<response>
<message>Quotas set</message>
</response>
</idibu>