Skip to content

Customer Site

The Customer Site endpoints provide the ability to store location information for each OAID, such as the site's coordinates and postal address.

Requirement: Relation Name

To create a site for an OAID, the relation between the involved PIP and ANO must be defined as a relation_name. Please store the relation data using the "Create Infra Relation" endpoint.

Create Customer Site

Location details for an OAID can be entered at the "Assign/Create Site" endpoint. This PUT method requires the oaid to be appended to the base URL as a path parameter.

The required attributes to submit in the request body are:

  • "token" - set to either "construction" or "operational"
  • "relation_names" - a list of relation names for each PIP-ANO relation involved
  • "center" - the coordinates of the customer site
$ curl --request PUT "https://api.oaid.at/v2/pip/sites/ABCD1234/" \
$  --header "Authorization: Bearer <access_token>" \
$  --header "Accept: application/json" \
$  --header "Content-Type: application/json" \
$  --data '{
        "token": "operational", 
        "relation_names": [
            "con_moorland", 
            "wholesale212"
        ], 
        "center": "48.20854733,16.37295900"
}'
---> 100%
{
    "oaid": "ABCD1234",
    "customer_reference": "loc01212-2442346",
    "token": "operational",
    "relation_names": [
        "con_moorland",
        "wholesale212"
    ],
    "status": "active",
    "address_reference": {
                "agwr_adr": "7654321-001",
                "agwr_obj": "0006543",
                "usr": "sdf-245-q3e"
    },
    "address": {
        "country": "AT",
        "zip": "4322",
        "city": "Flake",
        "street": "Maria Theresia Straße",
        "hnr": "13/a",
        "door": "2",
        "addon": "left entrance"
    },
    "lot_id": "04321:16/2",
    "center": "48.20854733,16.37295900",
    "created_at": "2019-05-29T17:11:14.206+00:00",
    "modified_at": "2021-04-12T13:03:07.566+00:00"
}

Read Customer Sites

Look up details regarding a site's location or a list of sites with the following endpoints.

Specific Site

Data about one site can be obtained by calling the GET method "Read Customer Site" endpoint and adding the specific oaid as a path parameter.

$ curl --request GET "https://api.oaid.at/v2/pip/sites/ABCD1234/" \
$  --header "Authorization: Bearer <access_token>" \
$  --header "Accept: application/json" 
---> 100%
{
    "oaid": "ABCD1234",
    "customer_reference": "loc01212-2442346",
    "token": "construction",
    "relation_names": [
        "con_moorland",
        "wholesale212"
    ],
    "status": "active",
    "address_reference": {
                "agwr_adr": "7654321-001",
                "agwr_obj": "0006543",
                "usr": "sdf-245-q3e"
    },
    "address": {
        "country": "AT",
        "zip": "4322",
        "city": "Flake",
        "street": "Maria Theresia Straße",
        "hnr": "13/a",
        "door": "2",
        "addon": "left entrance"
    },
    "lot_id": "04321:16/2",
    "center": "48.20854733,16.37295900",
    "created_at": "2019-05-29T17:11:14.206+00:00",
    "modified_at": "2021-04-12T13:03:07.566+00:00",
    "partners": [
      {
         "relation_name": "con_moorland",
         "pip": {
                "company_name": "fiberpark gmbh", 
                "rtr_agg_id": 412,
                "phone": "+43-1-987654321", 
                "email_to": "support@my-own-domain.at", 
                "pip_code": "fiber.pip"
        },
         "ano": {
                "company_name": "fiberpark gmbh",
                "rtr_agg_id": 413,
                "phone": "+43-1-987654321",
                "email_to": "support@my-own-domain.at",
                "ano_code": "fiber.ano"
        },
         "pip_url": "https://httpbin.org/get?oaid=ABCD1234&center=48.20854733,16.37295900&customer_reference=loc01212-2442346&pip_code=fiber.pip"
      },
      {
         "relation_name": "wholesale212",
         "pip": {
                "company_name": "fiberpark gmbh", 
                "rtr_agg_id": 412,
                "phone": "+43-1-987654321", 
                "email_to": "support@my-own-domain.at", 
                "pip_code": "fiber.pip"
        },
         "ano": {
                "company_name": "fiberpark gmbh",
                "rtr_agg_id": 413,
                "phone": "+43-1-987654321",
                "email_to": "support@my-own-domain.at",
                "ano_code": "fiber.ano"
        },
         "pip_url": "https://httpbin.org/get?oaid=ABCD1234&center=48.20854733,16.37295900&customer_reference=loc01212-2442346&pip_code=fiber.pip"
      }
  ]
}

All Sites

A list of sites can be read via the "List Customer Sites" endpoint. The search can be filtered by adding any of the query parameters: token, relation_name, tenant, or by the _page or _size parameters.

$ curl --request GET "https://api.oaid.at/v2/pip/sites/?_size=5" \
$  --header "Authorization: Bearer <access_token>" \
$  --header "Accept: application/json" 
---> 100%
[
    {
        "oaid": "ABCD1234",
        "customer_reference": "loc01212-2442346",
        "token": "construction",
        "relation_names": [
            "con_moorland",
            "wholesale212"
        ],
        "status": "active",
        "address_reference": {
                "agwr_adr": "7654321-001",
                "agwr_obj": "0006543",
                "usr": "sdf-245-q3e"
        },
        "address": {
            "country": "AT",
            "zip": "4322",
            "city": "Flake",
            "street": "Maria Theresia Straße",
            "hnr": "13/a",
            "door": "2",
            "addon": "left entrance"
        },
        "lot_id": "04321:16/2",
        "center": "48.20854733,16.37295900",
        "created_at": "2019-05-29T17:11:14.206+00:00",
        "modified_at": "2021-04-12T13:03:07.566+00:00"
    }
]

Update Customer Sites

Customer sites can be updated on an OAID by providing the oaid in the URL path when calling the "Update Customer Sites" endpoint.

$ curl --request PATCH "https://api.oaid.at/v2/pip/sites/ABCD1234/" \
$    --header "Authorization: Bearer <access_token>" \
$    --header "Accept: application/json" \
$    --header "Content-Type: application/json" \
$    --data '{"center": "48.3,16.2", "token": "operational"}'
---> 100%
{
    "oaid": "ABCD1234",
    "customer_reference": "loc01212-2442346",
    "token": "operational",
    "relation_names": [
        "con_moorland",
        "wholesale212"
    ],
    "status": "active",
    "address_reference": {
                "agwr_adr": "7654321-001",
                "agwr_obj": "0006543",
                "usr": "sdf-245-q3e"
    },
    "address": {
        "country": "AT",
        "zip": "4322",
        "city": "Flake",
        "street": "Maria Theresia Straße",
        "hnr": "13/a",
        "door": "2",
        "addon": "left entrance"
    },
    "lot_id": "04321:16/2",
    "center": "48.3,16.2",
    "created_at": "2019-05-29T17:11:14.206+00:00",
    "modified_at": "2021-04-12T13:03:07.566+00:00"
}

Remove Customer Site

Request the removal of the customer site for an OAID from the "Remove Customer Site" endpoint. Provide the oaid to be removed as a path parameter.

$ curl --request DELETE "https://api.oaid.at/v2/pip/sites/ABCD1234/"  \
$  --header "Authorization: Bearer <access_token>" \
$  --header "Accept: application/json" 
---> 100%

HTTP/1.1 204 No Content
Content-Type: application/json
Date: Sun, 12 Apr 2021 17:32:16 GMT
Server: uvicorn

<Response body is empty>Response code: 204 (No Content); Time: 122ms (122 ms); Content length: 0 bytes (0 B)