Skip to content

Add new endpoint for calling one shot wizard

Pelayo García requested to merge feature/endpoint-add-one-shot into master

CHANGELOG:

### Added
- [#638](https://gitlab.com/coopdevs/odoo-somconnexio/-/merge_requests/638) Add new public API endpoint to call one shot wizard and add additional bonds to existing mobile contracts 

Related card: https://trello.com/c/c5dCc0ed/991-endpoint-dabonament-addicional-a-lapi-p%C3%BAblica-dodoo


Endpoint to receive calls to add one shot additional bonds to mobile contracts (from OTRs)

> curl \
  -X POST \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Basic b2RvbzpQWEVyZVVnbzc3Y3E4M1J0QUEzR1MyTFRz' \
  --data '{
    "phone_number": "6788678668",
    "product_code": "CH_SC_OSO_1GB_ADDICIONAL"
  }' \
  "http://odoo-sc.local:8069/public-api/add-one-shot"
> {"result": "OK"}

Job created (and pending to notify OC): Screenshot_2021-10-08_at_16-21-52_Jobs_-_Odoo

Mobile contract with phone 6788678668 and 1 GB bond added Screenshot_2021-10-08_at_16-21-19_mobile_contract_-_Odoo

Edited by Pelayo García

Merge request reports

Loading