Skip to content

OAID

A valid access token is required for all processes. This can be obtained via the access credentials; the necessary steps are outlined here. With a valid access token, you can begin the creation of an OAID. If multiple OAIDs are needed, pull codes repeatedly within the token’s validity period, using the same access token.

Requirement: Tenant Contact Data

In order to begin creating OAIDs, your tenant contact data must first be stored at the "Set Tenant Contact" endpoint. To learn more details about the required data, please see the API Usage page.

Create OAID

Pulling a code creates a new OAID in the register and returns it in the response. This 8-digit OAID is linked to the user's account and cannot be changed. From a technical point of view, it is a POST request that instructs the API to add a new OAID to the user’s list. Once an OAID is pulled, this action can no longer be reversed.

$ curl --request POST --location "https://api.oaid.at/v2/pip/codes/" \
$  --header "Authorization: Bearer <access_token>" \
$  --header "Accept: application/json" \
$  --header "Content-Type: application/json" \
$  --data '{"customer_reference": "loc01212-2442346"}'
---> 100%

{
    "oaid": "ABCD1234",
    "version": "v8",
    "customer_reference": "loc01212-2442346",
    "status": "active",
    "token": "requested",
    "created_at": "2019-05-29T17:11:14.206+00:00"
}

Confirm OAID

The OAID generated in the previous step has not been confirmed yet. Complete the activation process by confirming it, which provides proof of receipt. Only then will the OAID be activated for further use.

Requirement: Confirmation of OAID

Confirmation is carried out by setting the so-called Milestone Token to "confirmed" on the token attribute of the specified OAID. Confirmation takes place implicitly through calling any of the following endpoints on the OAID:

  1. "Assign/Create Site" endpoint (recommended if storing site data)
  2. "Set OAID Attributes" endpoint

The temporal proximity of the actions, as depicted in the process diagram, is not necessary. CREATE and CONFIRM can be performed in separate sessions and at different times.

Read OAID

OAIDs may be read in one of the following ways: by looking up one OAID, or by searching a list of OAIDs.

Specific OAID

Look up a particular OAID via the "Read OAID" endpoint.

Place the OAID as a path parameter in the endpoint call. Below, the example OAID "ABCD1234" is used.

$ curl --request GET "https://api.oaid.at/v2/pip/codes/ABCD1234/" \
$  --header "Authorization: Bearer <access_token>" \
$  --header "Accept: application/json"
---> 100%
{
  "tenant": "fiberpark",
  "oaid": "ABCD1234",
  "version": "v8",
  "token": "requested",
  "status": "active",
  "customer_reference": "loc01212-2442346",
  "created_at": "2022-03-01T10:35:03.392+01:00",
  "modified_at": "2022-03-01T10:37:01.012+01:00"
}

All OAIDs

To read a list of OAIDs, use the "List OAIDs" endpoint.

The list may be filtered by providing the query parameters mentioned at the API endpoint. If query parameters are omitted, the endpoint returns a list of all OAIDs.

For instance, to just receive the last five OAIDs, add ?_size=5 at the end of the base URL. An example of this request is provided below.

$ curl --request GET "https://api.oaid.at/v2/pip/codes/?_size=5" \
$  --header "Authorization: Bearer <access_token>" \
$  --header "Accept: application/json"
---> 100%
[
    {
      "tenant": "fiberpark",
      "oaid": "ABCD1234",
      "version": "v8",
      "token": "requested",
      "status": "active",
      "customer_reference": "loc01212-2442346",
      "created_at": "2022-03-01T10:35:03.392+01:00",
      "modified_at": "2022-03-01T10:37:01.012+01:00"
    }
]

Set OAID Attributes

OAID attributes may be set or updated for a specific OAID through this PATCH method.

The OAID must be provided in the URL as a path parameter. Two attributes may be updated by this endpoint: "token" and "customer_reference".

  • "token" - token is set to "confirmed" by default
  • "customer_reference" - unique reference ID for the tenant

This endpoint will confirm a requested OAID. Since confirmation occurs implicitly through any request at this endpoint, {"token": "confirmed"} or { } will confirm the token.

$ curl --request PATCH "https://api.oaid.at/v2/pip/codes/ABCD1234/"  \
$  --header "Authorization: Bearer <access_token>" \
$  --header "Accept: application/json" \
$  --header "Content-Type: application/json" \
$  --data '{"customer_reference": "loc01212-1234567"}'
---> 100%

{
    "oaid": "ABCD1234",
    "version": "v8",
    "token": "confirmed",
    "status": "active",
    "customer_reference": "loc01212-1234567",
    "attr": {
        "mode": 13,
        "port_type": "STZ 13.3"
    },
    "created_at": "2019-05-29T17:11:14.206+00:00",
    "modified_at": "2021-04-12T13:03:07.566+00:00"
}

Cancel OAID

This DELETE request allows for the cancelation of an OAID.

The OAID to be deleted must be given as a path parameter in the request.

$ curl --request DELETE "https://api.oaid.at/v2/pip/codes/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)