Create a new pass
POST/pass-srv/pass
Creates a new digital pass with associated owner and holder information. The pass represents a digital credential that grants access to a service, event, or resource.
Required fields:
pass.passId: Unique identifier for the pass (must be unique across all passes)pass.productId: Product identifierpassUser.givenName: Owner's first namepassUser.familyName: Owner's last namepassUserHolder.sub: Subject identifier of the holder (must exist in the Cidaas user system)
Validation Rules:
passIdmust be unique across all passes (error code:PASS1017if duplicate)- The combination of
productId+productInstanceIdmust be unique (error code:PASS1016if duplicate) - If
validFromis provided,validTomust also be provided - If
validTois provided,validFrommust also be provided validTomust be aftervalidFrom- The
subinpassUserHoldermust exist in the Cidaas user system (error code:PASS1005if not found)
Auto-Generated/Default Values:
productInstanceId: Defaults topassIdif not providedcreatedAt: Auto-generated as current UTC timestamp if not providedupdatedAt: Auto-generated as current UTC timestamp if not providedadditionalTitle: Defaults to "not_defined" if not providedpassUserHolderRecord: Auto-created from user's social identity if not provided (includes: sub, familyName, givenName, birthdate, gender, locale, address)
Error Codes:
PASS1017: Pass with passId already existsPASS1016: Pass with productId + productInstanceId already existsPASS1005: No user with provided sub existsPASS1002: Missing required payload fields
Request
Responses
- 201
- 400
- 417
Pass created successfully
Bad Request - Invalid input data or missing required fields.
Common error codes:
PASS1002: Missing required payload fieldsPASS1005: No user with provided sub existsPASS1016: Pass with productId + productInstanceId already existsPASS1017: Pass with passId already exists
Expectation Failed - Validation error.
Common error codes:
- Validation errors for date ranges (validFrom/validTo)
- Field format validation errors