Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions code/API_definitions/device-identifier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,25 +125,27 @@
`429 TOO_MANY_REQUESTS`:
- The rate at which the API consumer is sending requests has exceeded that allowed by the API provider. Try again later.

### Additional CAMARA error responses
<!-- CAMARA:MANDATORY:additional-error-responses:BEGIN -->
# Additional CAMARA error responses

The list of error codes in this API specification is not exhaustive. Therefore the API specification may not document some non-mandatory error statuses as indicated in `CAMARA API Design Guide`.
The list of error codes in this API specification is not exhaustive. Therefore the API specification MAY not document some non-mandatory error statuses as indicated in `CAMARA API Design Guide`.

Please refer to the `CAMARA_common.yaml` of the Commonalities Release associated to this API version for a complete list of error responses. The applicable Commonalities Release can be identified in the `API Readiness Checklist` document associated to this API version.

As a specific rule, error `501 - NOT_IMPLEMENTED` can be only a possible error response if it is explicitly documented in the API.
<!-- CAMARA:MANDATORY:additional-error-responses:END -->

# Further info and support

## Authorization and authentication
<!-- CAMARA:MANDATORY:authorization-and-authentication:BEGIN -->
# Authorization and authentication

The "Camara Security and Interoperability Profile" provides details of how an API consumer requests an access token. Please refer to Identity and Consent Management (https://github.com/camaraproject/IdentityAndConsentManagement/) for the released version of the profile.

The specific authorization flows to be used will be agreed upon during the onboarding process, happening between the API consumer and the API provider, taking into account the declared purpose for accessing the API, whilst also being subject to the prevailing legal framework dictated by local legislation.

In cases where personal data is processed by the API and users can exercise their rights through mechanisms such as opt-in and/or opt-out, the use of three-legged access tokens is mandatory. This ensures that the API remains in compliance with privacy regulations, upholding the principles of transparency and user-centric privacy-by-design.
<!-- CAMARA:MANDATORY:authorization-and-authentication:END -->

## Identifying the device from the access token
# Identifying the device from the access token

This API requires the API consumer to identify a device as the subject of the API as follows:
- When the API is invoked using a two-legged access token, the subject will be identified from the optional `device` object, which therefore MUST be provided.
Expand All @@ -152,19 +154,22 @@

This approach simplifies API usage for API consumers using a three-legged access token to invoke the API by relying on the information that is associated with the access token and was identified during the authentication process.

### Error handling:
## Error handling:
- If the subject cannot be identified from the access token and the optional `device` object is not included in the request, then the server will return an error with the `422 MISSING_IDENTIFIER` error code.

- If the subject can be identified from the access token and the optional `device` object is also included in the request, then the server will return an error with the `422 UNNECESSARY_IDENTIFIER` error code. This will be the case even if the same device is identified by these two methods, as the server is unable to make this comparison.

## Multi-SIM scenario handling
# Multi-SIM scenario handling

In scenarios where a main phone number is shared between multiple devices, each of which has its own individual "secondary" phone number (e.g. connectivity plans that let you share your airtime and data allowances with a smartwatch or eSIM-enabled tablet), the phone number passed by the API consumer will be treated as the secondary phone number, and hence the identifier returned will be that of the single device associated with that phone number (e.g. smartphone, smartwatch, or eSIM-enabled tablet).

In such scenarios, the "primary" device is usually allocated the same main and secondary phone numbers, and hence providing the main phone number to the API will return the identity of the primary device (usually the smartphone) and not any associated devices.

(FAQs will be added in a later version of the documentation)
<!-- CAMARA:MANDATORY:request-body-strictness:BEGIN -->
# Request body strictness

This API rejects requests with JSON request bodies that contain properties not declared in this specification, at any nesting level. Unknown properties result in a `400 INVALID_ARGUMENT` response.
<!-- CAMARA:MANDATORY:request-body-strictness:END -->
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
Expand Down Expand Up @@ -284,7 +289,7 @@
post:
summary: Get a pseudonymous identifier for device being used by a given mobile subscriber
description: Get a pseudonymous identifier for device being used by a given mobile subscriber
operationId: retrievePPID

Check notice on line 292 in code/API_definitions/device-identifier.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

operationId must be camelCase

[S-007] Operation Id must be in Camel case "must be camel case"
tags:
- Get Device Identifiers
security:
Expand Down Expand Up @@ -675,18 +680,18 @@
pattern: ^[0-9]{8}$
description: IMEI TAC of the device
example: "49015420"
model:

Check notice on line 683 in code/API_definitions/device-identifier.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

String has no format/pattern/enum

[S-313] Schema of type string should specify a format, pattern, enum, or const. | Suggestion%3A Acceptable if free-form field or implementation-dependent — no fix needed.
type: string
maxLength: 32
description: Model of the device
example: "3110"
manufacturer:

Check notice on line 688 in code/API_definitions/device-identifier.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

String has no format/pattern/enum

[S-313] Schema of type string should specify a format, pattern, enum, or const. | Suggestion%3A Acceptable if free-form field or implementation-dependent — no fix needed.
type: string
maxLength: 32
description: Manufacturer of the device
example: "Nokia"

DevicePPID:

Check warning on line 694 in code/API_definitions/device-identifier.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

Schema name must be PascalCase

[S-015] DevicePPID should be PascalCase (UpperCamelCase)
description: |
The individual physical mobile device identifier, expressed as a PPID (Pairwise Pseudonymous Identifier)
type: object
Expand Down