Table of Contents

API pro práci se SIM kartami

Součást Odorik.cz API, poskytuje volání umožňující práci se SIM kartami.

Stav SIM karty a přepínání parametrů

GET /sim_cards.json

GET /sim_cards/<mobilni_cislo>.json

curl -X GET https://www.odorik.cz/api/v1/sim_cards/00420799799081.json -d user=6096177 -d password=xxxxxx -d include_available_data_packages=true
{ "id": 1013,
  "sim_number": "8942001100038961787F",
  "state": "active",
  "changes_in_progress": [],
  "data_package": "perKB_50MB",
  "data_package_for_next_month": "perKB_100MB",
  "data_bought_total": null,
  "data_used": null,
  "voice_package": "none",
  "voice_package_for_next_month": "none",
  "package_delayed_billing": "none",
  "package_delayed_billing_for_next_month": "none",
  "missed_calls_register": true,
  "mobile_data": true,
  "lte": true,
  "lte_for_next_month": true,
  "roaming": "eu_data_outgoing",
  "premium_services": "off",
  "available_data_packages": [
    {"name":"perKB_50MB","price":0},
    {"name":"perKB_100MB","price":0},
    {"name":"perKB_200MB","price":0},
    {"name":"perKB_400MB","price":0},
    {"name":"perKB_500MB","price":0},
    {"name":"150MB","price":60},
    {"name":"300MB","price":95},
    {"name":"600MB","price":160},
    {"name":"1000MB","price":220},
    {"name":"1500MB","price":295},
    {"name":"2000MB","price":320},
    {"name":"3000MB","price":440},
    {"name":"10GB","price":690} ]
}

PUT /sim_cards/<mobilni_cislo>.json

POST /sim_cards/<mobilni_cislo>/data_restart

curl -X POST https://www.odorik.cz/api/v1/sim_cards/00420799799081/data_restart -d user=6096177 -d password=xxxxxxx
ok

Historie mobilních dat

GET /sim_cards/<mobilni_cislo>/mobile_data.json

GET /sim_cards/mobile_data.json

[{"id":133,"date":"2013-07-11T14:43:59Z","bytes_up":151666,"bytes_down":3768,"bytes_total":155434,"price":0.1484,"price_per_mb":1.0,"phone_number":"00420799799799"}]

Přiřazení telefonního čísla k SIM kartě

POST /sim_cards/<mobilni_cislo>/assign_number_to_sim.json