Skip to main content

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 identifier
  • passUser.givenName: Owner's first name
  • passUser.familyName: Owner's last name
  • passUserHolder.sub: Subject identifier of the holder (must exist in the Cidaas user system)

Validation Rules:

  • passId must be unique across all passes (error code: PASS1017 if duplicate)
  • The combination of productId + productInstanceId must be unique (error code: PASS1016 if duplicate)
  • If validFrom is provided, validTo must also be provided
  • If validTo is provided, validFrom must also be provided
  • validTo must be after validFrom
  • The sub in passUserHolder must exist in the Cidaas user system (error code: PASS1005 if not found)

Auto-Generated/Default Values:

  • productInstanceId: Defaults to passId if not provided
  • createdAt: Auto-generated as current UTC timestamp if not provided
  • updatedAt: Auto-generated as current UTC timestamp if not provided
  • additionalTitle: Defaults to "not_defined" if not provided
  • passUserHolderRecord: 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 exists
  • PASS1016: Pass with productId + productInstanceId already exists
  • PASS1005: No user with provided sub exists
  • PASS1002: Missing required payload fields

Request

Responses

Pass created successfully