Implantation/Client activation

When a client with a port reservation in OZmap is activated, to turn it into an active client, it is necessary to change the deployment status of the reservation in OZmap from "Not Implanted" to "Implanted,".

Below, we provide an example of how using the OZmap API, you can activate/deploy a client’s reservation.

From this, we assume that this concept is clear. However, if you still have any questions, please contact our support team.

To help you understand, we will create an example scenario using the scope of an ERP system.

Initial scenario

As mentioned above, a client with a port reservation in OZmap was activated in the ERP.

Example

A customer with a port reservation in OZmap (previously created in OZmap with the deployment status "Not Implanted") has been activated in the ERP, meaning their physical installation has been completed and their service plan enabled. Since this is a reservation, the customer also needs to be activated in OZmap by changing their deployment status to "Implanted."

At this point, the ERP will retrieve the client’s information from OZmap using their code, and with the returned data, it will update the client’s deployment status in OZmap.

Below there's a flow to facilitate the understanding:

Untitled Diagram (6).webp

API

The next step is to figure out how to call OZmap to activate a client’s reservation.

Here’s an example:

The code that identifies the client’s reservation in OZmap will be used to activate the client. For this example, let’s assume the reservation code is: reservation_123

With the reservation code reservation_123, the search in OZmap is performed as follows:

curl --location -g --request GET 'https://sandbox.ozmap.com.br:9994/api/v2/properties/client/reservation_123' \ --header 'authorization: AUTHORIZATION_TOKEN'

Attention! The authorization token must be created in the OZmap interface. For more information, click here.

The expected return to that request is:

[ { "_id": "63ed056e7112800014c1c731", "observation": "", "drop": "63ed056e7112800014c1c733", "tags": [], "cables": [], "kind": "Property", "coords": [ -48.52405115962029, -27.580520760129144 ], "address": "", "box": "5da752a411450e0006947fad", "pole": "5da74b5a11450e0006947e9a", "client": { "_id": "63ed056d7112800014c1c72e", "certified": false, "status": 0, "observation": "", "tags": [], "implanted": true, "onu": { "user_PPPoE": "", "serial_number": "", "mac_address": "" }, "kind": "ftth", "code": "reserva_123", "name": "Cliente teste", "creatorData": { "id": "5d9f3fb8200141000647f768", "name": "Support OZmap", "username": "devoz" }, "createdAt": "2023-02-15T16:16:45.926Z", "updatedAt": "2023-02-15T17:37:29.597Z", "__v": 0 }, "project": "5d9f3ff9200141000647f814", "creatorData": { "id": "5d9f3fb8200141000647f768", "name": "Support OZmap", "username": "devoz" }, "history": { "clients": [ { "id": "63ed056d7112800014c1c72e", "code": "Reserva_123", "enter_date": "2023-02-15T16:16:46.011Z", "exit_date": null } ] }, "createdAt": "2023-02-15T16:16:46.017Z", "updatedAt": "2023-02-15T17:37:29.614Z", "__v": 0, "connections": [ { "id": "5da752a511450e0006947fb0", "kind": "Splitter", "port": 1, "name": "Splitter 1", "implanted": true, "fiber": "63ed056e7112800014c1c734" } ] } ]

 

The used field for this situation is the _id of the client object, which in this example has the value 63ed056d7112800014c1c72e.

With the code 63ed056d7112800014c1c72e, the client activation is made like this:

curl --location --request PATCH 'https://sandbox.ozmap.com.br:9994/api/v2/ftth-clients/63ed056d7112800014c1c72e' \ --header 'Authorization: AUTHORIZATION_TOKEN' \ --data-raw '{ "implanted": true }'

Attention! The authorization token must be created in the OZmap interface. For more information, click here.

The expected return for this client would be no message, indicating that the client/reservation was successfully activated.