Skip to main content

Expose a REST API to create CRM Leads using the CRM Lead Som Connexió 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 for creating CRMLeads (service requests) with all the necessary data to activate the services offered by SomConnexió.

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 user allowed to create CRMLeads.

Usage

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

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file odoo-addon-crm_lead_api_somconnexio-16.0.1.0.2.tar.gz.

File metadata

File hashes

Hashes for odoo-addon-crm_lead_api_somconnexio-16.0.1.0.2.tar.gz
Algorithm Hash digest
SHA256 52da8cd63c3d3e1668663628f93b246043855c4e09f667c3334450d0ba305799
MD5 a13a43545978d12cdb96cb444ef64a03
BLAKE2b-256 1472a268cf5471958cbc00453943310a06e3f597e15b4d4ae65c81f1a3d41f8d

See more details on using hashes here.

File details

Details for the file odoo_addon_crm_lead_api_somconnexio-16.0.1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for odoo_addon_crm_lead_api_somconnexio-16.0.1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e013665d76037cdee5f61d5c67d35fdd3c3e1a86820833e37ccc463e4d9999c9
MD5 0959d208182861f3902bd11a917ed026
BLAKE2b-256 457247c698f4cac385a613467156e0142bdeda67b732367f6152a90804227a63

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