Skip to main content

Expose a REST API to integrate cooperators and sponsorship to Som Connexió partner structure.

Project description

Beta License: AGPL-3 coopdevs/som-connexio/odoo-somconnexio Translate me on Weblate

This module is a part of SomConnexió original module.

We are working to separate the monolitic original module in small modules splited by functionalities.

This module provides a REST API to work with partners and subscription requests that depend on the cooperator SomConnexio modules.

Table of contents

Configuration

To configure this addon in your Odoo project, follow these steps:

  1. Install the package.

  2. Go to Settings > Technical > Auth Api Key.

  3. Create an API Key related with an admin user.

Usage

This module Here’s an example of how to use the REST API to create a CRMLead:

import requests

url = "https://your-odoo-server/api/crmlead"
payload = {
    "partner_id": "1234",
    "iban": "ES62 3025 0011 7814 0009 1223",
    "lead_line_ids": [
        {
            "product_code": "SE_SC_REC_MOBILE_PACK_UNL_20480",
            "mobile_isp_info": {
                "icc_donor": "123",
                "phone_number": "654121234",
                "type": "new",
                "delivery_address": {
                    "street": "Carrer Oliva 4b",
                    "street2": "",
                    "zip_code": "08640",
                    "city": "Banyoles",
                    "country": "ES",
                    "state": "B",
                },
                "invoice_address": {
                    "street": "Carrer Oliva 4b",
                    "street2": "",
                    "zip_code": "08640",
                    "city": "Banyoles",
                    "country": "ES",
                    "state": "B",
                },
            },
            "broadband_isp_info": {},
        },
        # Add here other CRMLeadLine if is required.
        # One CRMLeadLine per service.
    ],
}

response = requests.post(url, json=payload)
print(response.json())

Contributors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

File details

Details for the file odoo-addon-cooperator_api_somconnexio-16.0.1.0.0.tar.gz.

File metadata

File hashes

Hashes for odoo-addon-cooperator_api_somconnexio-16.0.1.0.0.tar.gz
Algorithm Hash digest
SHA256 2d9beec1d849bf0a6bcca58aa2d72ed7b72d176999a5a9d7876038bfbc839eed
MD5 dc86ab9c8888144a9fb35dd77c161cc3
BLAKE2b-256 7cd747c29c884ff760d68576bec10cf8b6a3204369b40b2fd2dfcd5d5132497a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page