Skip to main content

rates_packs

Creates, updates, deletes, gets or lists a rates_packs resource.

Overview​

Namerates_packs
TypeResource
Idovh.sms.rates_packs

Fields​

The following fields are returned by SELECT queries:

Details about a SMS pack

NameDatatypeDescription
country_codestringDestination country code (ad, ae, af, ag, ai, al, all, am, an, ao, ar, at, au, aw, az, ba, bb, bd, be, bf, bg, bh, bi, bj, bm, bn, bo, br, bs, bt, bw, by, bz, ca, cd, cf, cg, ch, ci, ck, cl, cm, cn, co, cr, cu, cv, cy, cz, de, dk, dm, dz, ec, ee, eg, es, et, fi, fj, fk, fo, fr, ga, gb, gd, ge, gf, gh, gi, gl, gm, gn, gp, gq, gr, gt, gu, gw, gy, hk, hn, hr, ht, hu, id, ie, il, in, io, iq, ir, is, it, jm, jo, jp, ke, kg, kh, km, kn, kr, kw, ky, kz, la, lb, lc, li, lk, lr, ls, lt, lu, lv, ly, ma, md, me, mg, mk, ml, mn, mo, mq, mr, ms, mt, mu, mv, mw, mx, my, mz, na, nc, ne, ng, ni, nl, no, np, nz, om, pa, pe, pf, pg, ph, pk, pl, ps, pt, py, qa, re, ro, rs, ru, rw, sa, sb, sc, sd, se, sg, si, sk, sl, sm, sn, so, sr, st, sv, sy, sz, tc, td, tg, th, tj, tl, tm, tn, to, tr, tt, tw, tz, ua, ug, us, uy, uz, vc, ve, vg, vi, vn, vu, ws, ye, yt, za, zm, zw) (wire: countryCode)
creditnumberCredits consumed by sending one SMS towards the given destination
credit_priceobjectPrice of one credit, including pack's promotion (wire: creditPrice)
credit_quantity_maxintegerMaximum quantity (excluded) of credit to order to have this price (wire: creditQuantityMax)
credit_quantity_minintegerMinimum quantity (included) of credit to order to have this price (wire: creditQuantityMin)
discount_credit_priceobjectPrice of one credit, during a promotional event (wire: discountCreditPrice)
discount_percentageintegerPercentage applied as part of a promotional event (wire: discountPercentage)
discount_sms_priceobjectPrice of one SMS, during a promotional event (wire: discountSmsPrice)
sms_priceobjectPrice of one SMS sent towards the given destination, including pack's promotion (wire: smsPrice)
sms_quantity_maxintegerMaximum quantity (excluded) of SMS you can obtain with this pack (wire: smsQuantityMax)
sms_quantity_minintegerMinimum quantity (included) of SMS you can obtain with this pack (wire: smsQuantityMin)
vat_ratenumberThe VAT rate applied from the provided billing country. (wire: vatRate)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectcountrybilling_countryList SMS pack prices. Returns the SMS packs that can be bought for a destination country: credit and SMS quantities, prices, discount and VAT rate.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
countrystringCountry where you send SMS
billing_countrystringCountry where you buy credits (wire: billingCountry)

SELECT examples​

List SMS pack prices. Returns the SMS packs that can be bought for a destination country: credit and SMS quantities, prices, discount and VAT rate.

SELECT
country_code,
credit,
credit_price,
credit_quantity_max,
credit_quantity_min,
discount_credit_price,
discount_percentage,
discount_sms_price,
sms_price,
sms_quantity_max,
sms_quantity_min,
vat_rate
FROM ovh.sms.rates_packs
WHERE country = '{{ country }}' -- required
AND billing_country = '{{ billing_country }}'
;