{"openapi":"3.1.1","info":{"version":"2.15.0","title":"ADR RewardSTACK™ Platform","description":"ADR RewardSTACK™ management API.","contact":{"email":"technology@alldigitalrewards.com"}},"servers":[{"url":"https://admin.stage.alldigitalrewards.com","description":"Staging environment"},{"url":"https://admin.alldigitalrewards.com","description":"Production environment"}],"tags":[{"name":"Token","description":"Generate a JSON Web Token for use in API access. This token is valid for 2 hours after creation by default."},{"name":"Organization","description":"Operations for organization management and review."},{"name":"Organization > Webhook","description":"Operations for webhook management and review."},{"name":"Program","description":"Operations for program management and review."},{"name":"Participant","description":"Operations for participant management and review."},{"name":"Participant > Point Adjustment","description":"Credit or Debit Points from Participants."},{"name":"point sharing","description":"Share points between participants within the same program."},{"name":"Participant > SSO","description":"Generate Single Sign On URL for Participants."},{"name":"Participant > Transaction","description":"Operations for transaction management and review."},{"name":"Program > Catalog","description":"Search and browse the product catalog for a program."},{"name":"Service Award","description":"Manage service awards for a program. Service awards allow you to automatically issue rewards (points or products) to participants based on milestone dates such as hire anniversaries. Awards can be configured to trigger yearly or at a custom interval."},{"name":"Milestone","description":"Operations for milestone management and review."},{"name":"Milestone > Activity","description":"Operations for milestone activity management."},{"name":"Milestone > Participant Progress","description":"Operations for participant milestone progress tracking."},{"name":"Batch","description":"Batch operations for creating multiple resources at once."}],"paths":{"/token":{"post":{"tags":["Token"],"summary":"Use Basic authentication to generate a new JWT for use in API access","operationId":"generateToken","security":[{"BasicAuth":[]}],"parameters":[{"name":"hoursUntilExpiry","in":"query","required":false,"description":"Number of hours until the token expires.","schema":{"type":"integer","minimum":1,"maximum":8760,"default":2}},{"name":"tokenName","in":"query","required":false,"description":"Optional name for the token.","schema":{"type":"string","maxLength":255}}],"responses":{"201":{"description":"JWT is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JwtResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"example":["The hoursUntilExpiry parameter must be an integer.","The maximum token duration is 8760 hours (1 year)."]}}}},"401":{"description":"Unauthorized Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"default":{"description":"Unknown exception"}}}},"/api/organization":{"get":{"tags":["Organization"],"summary":"Retrieve organization collection with optional filters","operationId":"getOrganizationList","security":[{"Bearer":[]}],"description":"Returns organization collection.","parameters":[{"name":"parent","in":"query","required":false,"description":"Return all children organizations of this parent unique identifier.","schema":{"type":"string"}},{"name":"name","in":"query","required":false,"description":"Fuzzy match on the name of organization to return.","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Request a specific page number starting with page 1.","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"description":"Set the number of desired results per page.","schema":{"type":"integer","default":30}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationList"}}}}},"default":{"description":"Unknown exception"}}},"post":{"tags":["Organization"],"summary":"Add a new organization.","operationId":"addOrganization","security":[{"Bearer":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCreate"}}},"description":"Organization object to add to the marketplace.","required":true},"responses":{"201":{"description":"Create a new organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRead"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object"}}}}}},"default":{"description":"Unknown exception"}}}},"/api/organization/{uniqueId}":{"get":{"tags":["Organization"],"operationId":"getOrganization","security":[{"Bearer":[]}],"summary":"Find an organization by ID","description":"Returns a single organization.","parameters":[{"name":"uniqueId","in":"path","required":true,"description":"The organization unique_id.","schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRead"}}}},"404":{"description":"Organization not found"}}},"put":{"tags":["Organization"],"summary":"Update an organization.","operationId":"updateOrganization","security":[{"Bearer":[]}],"parameters":[{"name":"uniqueId","in":"path","required":true,"description":"The organization unique_id.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}},"description":"Organization properties to update. Only include fields you wish to change.","required":true},"responses":{"200":{"description":"Organization updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRead"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object"}}}}}},"default":{"description":"Unknown exception"}}}},"/api/organization/{orgId}/webhooks":{"get":{"tags":["Organization > Webhook"],"operationId":"listWebhooks","security":[{"Bearer":[]}],"summary":"List organization webhooks","description":"Returns a list of configured webhooks.","parameters":[{"name":"orgId","in":"path","required":true,"description":"The organization unique_id.","schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookRead"}}}}},"404":{"description":"Organization not found."}}},"post":{"tags":["Organization > Webhook"],"operationId":"createWebhook","security":[{"Bearer":[]}],"summary":"Create a webhook","description":"Create a webhook.","parameters":[{"name":"orgId","in":"path","required":true,"description":"The organization unique_id.","schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/WebhookCreate"},"responses":{"204":{"description":"successful operation"},"400":{"description":"Invalid properties sent."}}}},"/api/organization/{orgId}/webhooks/{webhookId}":{"get":{"tags":["Organization > Webhook"],"operationId":"getWebhook","security":[{"Bearer":[]}],"summary":"Get Webhook","description":"Returns the requested webhook model.","parameters":[{"name":"orgId","in":"path","required":true,"description":"The organization unique_id.","schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"description":"Webhook ID.","schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRead"}}}},"404":{"description":"Webhook not found."}}},"put":{"tags":["Organization > Webhook"],"operationId":"updateWebhook","security":[{"Bearer":[]}],"summary":"Update a webhook","description":"Update a webhook. Immutable webhooks cannot be modified.","parameters":[{"name":"orgId","in":"path","required":true,"description":"The organization unique_id.","schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"description":"Webhook ID.","schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/WebhookCreate"},"responses":{"204":{"description":"successful operation"},"400":{"description":"Invalid properties sent or webhook is immutable."},"404":{"description":"Webhook not found."}}}},"/api/organization/{orgId}/webhooks/{webhookId}/logs":{"get":{"tags":["Organization > Webhook"],"operationId":"getWebhookLogs","security":[{"Bearer":[]}],"summary":"Get Webhook Logs","description":"Returns the requested webhook logs that match the provided criteria. The response is limited to 100 logs per request. The status_code filter only returns logs where the most recent response from the configured server matches that HTTP Status code.","parameters":[{"name":"orgId","in":"path","required":true,"description":"The organization unique_id.","schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"description":"Webhook ID.","schema":{"type":"integer"}},{"name":"status_code","in":"query","required":false,"description":"The HTTP Status code of the last response of any given webhook log.","schema":{"type":"integer"}},{"name":"last_id","in":"query","required":false,"description":"The MongoDB ObjectId of the last Webhook Log read. The response will start with the next Webhook Log in line.","schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookLogs"}}}}}}},"/api/organization/{orgId}/webhooks/{webhookId}/logs/{webhookLogId}":{"get":{"tags":["Organization > Webhook"],"operationId":"viewWebhookLog","security":[{"Bearer":[]}],"summary":"View a single webhook log","description":"View a single webhook log.","parameters":[{"name":"orgId","in":"path","required":true,"description":"The organization unique_id.","schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"description":"Webhook ID.","schema":{"type":"integer"}},{"name":"webhookLogId","in":"path","required":true,"description":"Webhook Log MongoDB ObjectId.","schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookLog"}}}},"404":{"description":"Webhook log not found."}}}},"/api/organization/{orgId}/webhooks/{webhookId}/logs/{webhookLogId}/replay":{"post":{"tags":["Organization > Webhook"],"operationId":"replayWebhookLog","security":[{"Bearer":[]}],"summary":"Replay Webhook Log","description":"Replays the Webhook. This repeats the stored request exactly as you see it in the viewWebhookLog call. This will store the response and return the HTTP Status code the server gave when replaying the webhook.","parameters":[{"name":"orgId","in":"path","required":true,"description":"The organization unique_id.","schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"description":"Webhook ID.","schema":{"type":"integer"}},{"name":"webhookLogId","in":"path","required":true,"description":"Webhook Log MongoDB ObjectId.","schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookReplayResponse"}}}}}}},"/api/program":{"get":{"tags":["Program"],"summary":"Retrieve program collection with optional filters","operationId":"getProgramList","security":[{"Bearer":[]}],"description":"Returns program collection.","parameters":[{"name":"organization","in":"query","required":false,"description":"Organization unique_id to filter programs by.","schema":{"type":"string"}},{"name":"name","in":"query","required":false,"description":"Name of program to return (LIKE search).","schema":{"type":"string"}},{"name":"active","in":"query","required":false,"description":"Filter by active status (1 or 0).","schema":{"type":"integer","enum":[0,1]}},{"name":"published","in":"query","required":false,"description":"Filter by published status (1 or 0).","schema":{"type":"integer","enum":[0,1]}},{"name":"uri","in":"query","required":false,"description":"Filter by full domain URL (subdomain.domain).","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Request a specific page number starting with page 1.","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"description":"Set the number of desired results per page.","schema":{"type":"integer","default":30}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProgramList"}}}}},"default":{"description":"Unknown exception"}}},"post":{"tags":["Program"],"summary":"Add a new program.","operationId":"addProgram","security":[{"Bearer":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgramCreate"}}},"description":"Program object to add to the marketplace.","required":true},"responses":{"201":{"description":"Create a new program","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgramRead"}}}},"400":{"description":"Validation error"},"default":{"description":"Unknown exception"}}}},"/api/program/{uniqueId}":{"get":{"tags":["Program"],"summary":"Find a program by ID","operationId":"getProgram","security":[{"Bearer":[]}],"description":"Returns a single program.","parameters":[{"name":"uniqueId","in":"path","required":true,"description":"The Program unique_id or full domain (subdomain.domain).","schema":{"type":"string"}},{"name":"lang","in":"query","required":false,"description":"Language code for product criteria localization.","schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgramRead"}}}},"404":{"description":"Program not found"},"default":{"description":"Unknown exception"}}},"put":{"tags":["Program"],"summary":"Update a program.","operationId":"updateProgram","security":[{"Bearer":[]}],"parameters":[{"name":"uniqueId","in":"path","required":true,"description":"The Program unique_id or full domain (subdomain.domain).","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgramUpdate"}}},"description":"Program properties to update. Only include fields you wish to change.","required":true},"responses":{"200":{"description":"Program updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgramRead"}}}},"400":{"description":"Validation error"},"default":{"description":"Unknown exception"}}}},"/api/program/{uniqueId}/metrics":{"get":{"tags":["Program"],"summary":"Fetch basic program metrics","operationId":"getProgramMetrics","security":[{"Bearer":[]}],"description":"Returns basic program metrics.","parameters":[{"name":"uniqueId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgramMetrics"}}}},"default":{"description":"Unknown exception"}}}},"/api/program/{programId}/participant":{"get":{"tags":["Participant"],"summary":"Retrieve participant collection with optional filters","operationId":"getParticipantList","security":[{"Bearer":[]}],"description":"Returns participant collection.","parameters":[{"name":"programId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}},{"name":"name","in":"query","required":false,"description":"Filter by first/last name or combined name (substring search).","schema":{"type":"string"}},{"name":"email_address","in":"query","required":false,"description":"Filter by email address (substring search).","schema":{"type":"string"}},{"name":"unique_id","in":"query","required":false,"description":"Filter by participant unique_id (prefix search).","schema":{"type":"string"}},{"name":"active","in":"query","required":false,"description":"Filter by active status (0 or 1).","schema":{"type":"integer","enum":[0,1]}},{"name":"status","in":"query","required":false,"description":"Filter by participant status.","schema":{"$ref":"#/components/schemas/UserStatusEnum"}},{"name":"points_greater_than","in":"query","required":false,"description":"Filter by minimum credit balance.","schema":{"type":"number"}},{"name":"metaKey","in":"query","required":false,"description":"Filter by meta data key name (use with metaValue).","schema":{"type":"string"}},{"name":"metaValue","in":"query","required":false,"description":"Filter by meta data value (use with metaKey).","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Request a specific page number starting with page 1.","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"description":"Set the number of desired results per page.","schema":{"type":"integer","default":30,"maximum":500}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserList"}}}}},"default":{"description":"Unknown exception"}}},"post":{"tags":["Participant"],"summary":"Add a new participant.","operationId":"addUser","security":[{"Bearer":[]}],"parameters":[{"name":"programId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/UserWrite"},"responses":{"201":{"description":"Participant created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParticipantRead"}}}},"400":{"description":"Validation error"},"default":{"description":"Unknown exception"}}}},"/api/program/{programId}/participant/list":{"post":{"tags":["Participant"],"summary":"Bulk Fetch Participants by Unique ID","operationId":"getBulkParticipantList","security":[{"Bearer":[]}],"description":"Returns participant collection matching the provided unique IDs. Limited to 500 results.","parameters":[{"name":"programId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParticipantIdArray"}}},"description":"Array of participant_id to request. The request header content-type must be application/json.","required":true},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserList"}}}}},"400":{"description":"participant_id collection must be provided."},"default":{"description":"Unknown exception"}}}},"/api/program/{programId}/participant/{uniqueId}":{"get":{"tags":["Participant"],"summary":"Find a participant by ID","operationId":"getUser","security":[{"Bearer":[]}],"description":"Returns a single participant with full details including address and meta.","parameters":[{"name":"programId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}},{"name":"uniqueId","in":"path","required":true,"description":"Unique ID of participant to return.","schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParticipantRead"}}}},"404":{"description":"Resource does not exist."}}},"put":{"tags":["Participant"],"summary":"Update a participant.","operationId":"updateUser","security":[{"Bearer":[]}],"description":"Update participant properties. Cannot modify unique_id, program, organization, or credit. Meta data is completely replaced (PUT semantics). Use PATCH on the /meta endpoint to merge instead.","parameters":[{"name":"programId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}},{"name":"uniqueId","in":"path","required":true,"description":"Unique ID of participant to update.","schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/UserWrite"},"responses":{"200":{"description":"Participant updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParticipantRead"}}}},"400":{"description":"Validation error"},"default":{"description":"Unknown exception"}}},"delete":{"tags":["Participant"],"summary":"Delete participant (GDPR PII removal)","operationId":"deleteUser","security":[{"Bearer":[]}],"description":"Removes participant PII (firstname, lastname, email, phone, birthdate, address). Sets status to DATADEL and active to 0. This is irreversible — no further updates can be made to DATADEL participants.","parameters":[{"name":"programId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}},{"name":"uniqueId","in":"path","required":true,"description":"Unique ID of participant to delete.","schema":{"type":"string"}}],"responses":{"204":{"description":"Participant PII removed."},"404":{"description":"Participant not found."}}}},"/api/program/{programId}/participant/{uniqueId}/transaction":{"get":{"tags":["Participant > Transaction"],"summary":"Retrieve list of participant transactions","operationId":"getTransactionList","security":[{"Bearer":[]}],"description":"Returns a transaction collection.","parameters":[{"name":"programId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}},{"name":"uniqueId","in":"path","required":true,"description":"Unique ID of the participant.","schema":{"type":"string"}},{"name":"unique_id[]","in":"query","required":false,"description":"An array of one or more transaction unique_id's to filter by.","schema":{"type":"array","items":{"type":"string"}}},{"name":"year","in":"query","required":false,"description":"Filter by year (YYYY). Must be > 2015 and <= current year.","schema":{"type":"integer","minimum":2016}},{"name":"start_date","in":"query","required":false,"description":"Filter transactions from this date (Y-m-d or Y-m-d H:i:s).","schema":{"type":"string"}},{"name":"end_date","in":"query","required":false,"description":"Filter transactions to this date (Y-m-d or Y-m-d H:i:s).","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number for pagination.","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"description":"Number of results per page.","schema":{"type":"integer","default":30}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}}}}},"400":{"description":"Invalid filter parameters."}}},"post":{"tags":["Participant > Transaction"],"summary":"Add a new participant transaction.","operationId":"addTransaction","security":[{"Bearer":[]}],"parameters":[{"name":"programId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}},{"name":"uniqueId","in":"path","required":true,"description":"Unique ID of the participant.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTransaction"}}},"description":"Transaction creation for participant.","required":true},"responses":{"201":{"description":"Transaction created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"400":{"description":"Validation error. Common reasons include: product does not exist, participant does not have enough points (and issue_points is not true), address verification failed, ranged product value exceeds valid range, product is out of inventory, participant is not active."},"default":{"description":"Unknown exception"}}}},"/api/program/{programId}/participant/{uniqueId}/transaction/{transactionId}":{"get":{"tags":["Participant > Transaction"],"summary":"Retrieve a single transaction","operationId":"getTransaction","security":[{"Bearer":[]}],"description":"Returns a single transaction.","parameters":[{"name":"programId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}},{"name":"uniqueId","in":"path","required":true,"description":"Unique ID of the participant the transaction belongs to.","schema":{"type":"string"}},{"name":"transactionId","in":"path","required":true,"description":"ID of Transaction.","schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"400":{"description":"Resource does not exist."}}}},"/api/program/{programId}/participant/{uniqueId}/transaction/{transactionId}/meta":{"patch":{"tags":["Participant > Transaction"],"summary":"Add or Update one or more meta key pair values.","operationId":"patchTransactionMeta","security":[{"Bearer":[]}],"description":"Add or Update one or more meta key pair values. The transactionId property in the URL can either be a transaction Item GUID or a Transaction ID (integer). Either will identify the correct transaction and add the appropriate metadata.","parameters":[{"name":"programId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}},{"name":"uniqueId","in":"path","required":true,"description":"Unique ID of the participant the transaction belongs to.","schema":{"type":"string"}},{"name":"transactionId","in":"path","required":true,"description":"Transaction ID (integer) or Transaction Item GUID (string).","schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/MetaArray"},"responses":{"202":{"description":"successful operation"},"400":{"description":"Invalid meta or resource does not exist."}}}},"/api/program/{programId}/participant/{uniqueId}/transaction/{transactionId}/return/{itemGuid}":{"get":{"tags":["Participant > Transaction"],"summary":"Retrieve a return","operationId":"getReturn","security":[{"Bearer":[]}],"description":"Returns a transaction item return record.","parameters":[{"name":"programId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}},{"name":"uniqueId","in":"path","required":true,"description":"Unique ID of the participant the transaction belongs to.","schema":{"type":"string"}},{"name":"transactionId","in":"path","required":true,"description":"ID of Transaction.","schema":{"type":"integer"}},{"name":"itemGuid","in":"path","required":true,"description":"GUID of Transaction Item.","schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnRead"}}}},"404":{"description":"Resource does not exist."}}},"post":{"tags":["Participant > Transaction"],"summary":"Create a return for a transaction item","operationId":"createReturn","security":[{"Bearer":[]}],"description":"Issue a return for a transaction item. Each item can only be returned once.","parameters":[{"name":"programId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}},{"name":"uniqueId","in":"path","required":true,"description":"Unique ID of the participant the transaction belongs to.","schema":{"type":"string"}},{"name":"transactionId","in":"path","required":true,"description":"ID of Transaction.","schema":{"type":"integer"}},{"name":"itemGuid","in":"path","required":true,"description":"GUID of Transaction Item to return.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"string","description":"Optional notes for the return."}}}}}},"responses":{"201":{"description":"Return created."},"400":{"description":"Item already returned or invalid request."},"404":{"description":"Resource does not exist."}}}},"/api/program/{programId}/participant/{uniqueId}/adjustment":{"get":{"tags":["Participant > Point Adjustment"],"summary":"Retrieve list of participant adjustments","operationId":"getAdjustmentList","security":[{"Bearer":[]}],"description":"Returns an adjustment collection.","parameters":[{"name":"programId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}},{"name":"uniqueId","in":"path","required":true,"description":"Unique ID of the participant.","schema":{"type":"string"}},{"name":"start_date","in":"query","required":false,"description":"Filter adjustments from this date (Y-m-d or Y-m-d H:i:s).","schema":{"type":"string"}},{"name":"end_date","in":"query","required":false,"description":"Filter adjustments to this date (Y-m-d or Y-m-d H:i:s).","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number for pagination.","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"description":"Number of results per page.","schema":{"type":"integer","default":30}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PointRead"}}}}},"400":{"description":"Invalid date format."}}},"post":{"tags":["Participant > Point Adjustment"],"summary":"Add participant point adjustment.","operationId":"addAdjustment","security":[{"Bearer":[]}],"parameters":[{"name":"programId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}},{"name":"uniqueId","in":"path","required":true,"description":"Unique ID of the participant.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PointWrite"}}},"description":"Adjustment creation for participant.","required":true},"responses":{"201":{"description":"Adjustment created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PointReadWithUser"}}}},"default":{"description":"Unknown exception"}}}},"/api/program/{programId}/participant/{uniqueId}/adjustment/{adjustmentId}":{"patch":{"tags":["Participant > Point Adjustment"],"summary":"Update an existing point adjustment","description":"Update an existing point adjustment. No single property in the body is required when updating. All properties not listed here will be ignored. Only metadata fields can be updated — amount and type cannot be changed.","operationId":"patchAdjustment","security":[{"Bearer":[]}],"parameters":[{"name":"programId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}},{"name":"uniqueId","in":"path","required":true,"description":"Unique ID of participant that owns the adjustment.","schema":{"type":"string"}},{"name":"adjustmentId","in":"path","required":true,"description":"ID of adjustment.","schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PointUpdate"}}},"description":"Adjustment properties to update.","required":true},"responses":{"202":{"description":"Successful operation"},"404":{"description":"Adjustment not found."},"default":{"description":"Unknown exception"}}}},"/api/program/{programId}/participant/{uniqueId}/share":{"post":{"tags":["point sharing"],"summary":"Share points with another participant","description":"Transfer shareable points from one participant to another within the same program. The sharer must have sufficient shareable points (shared_credit balance) and point_sharing must be enabled on the program. Both participants must be active.","operationId":"sharePoints","security":[{"Bearer":[]}],"parameters":[{"name":"programId","in":"path","required":true,"description":"The Program Unique Identifier.","schema":{"type":"string","format":"uuid"}},{"name":"uniqueId","in":"path","required":true,"description":"Unique ID of the participant sharing points.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharePointsRequest"}}},"description":"Point sharing request details.","required":true},"responses":{"201":{"description":"Points shared successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharePointsResponse"}}}},"400":{"description":"Bad request. Returned for all error cases, including when the sharer participant does not exist (\"Resource does not exist\"). Other reasons: insufficient shareable points, recipient not found in the program, cannot share with yourself, recipient is inactive, amount must be greater than zero, point sharing is not enabled on the program, or a configured sharing limit (per transaction, daily, weekly, monthly, or total) has been reached.","content":{"application/json":{"schema":{"oneOf":[{"type":"array","description":"A list of one or more validation error messages.","items":{"type":"string"},"example":["Insufficient shareable points"]},{"type":"object","description":"Returned when a configured program sharing limit is reached. Adds the maximum amount the participant may currently share and which threshold is limiting it.","properties":{"errors":{"type":"array","items":{"type":"string"}},"max_shareable":{"type":"number","description":"The maximum amount the participant can currently share given the limiting threshold."},"limiting_threshold":{"type":"string","nullable":true,"description":"Which configured limit is being hit (for example per_transaction, daily, weekly, monthly, total, or balance). May be null."}}}]}}}},"default":{"description":"Unknown exception"}}}},"/api/program/{programId}/participant/{uniqueId}/sso":{"post":{"tags":["Participant > SSO"],"summary":"Create a Single Sign On token for a participant.","operationId":"generateSSOToken","security":[{"Bearer":[]}],"parameters":[{"name":"programId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}},{"name":"uniqueId","in":"path","required":true,"description":"Unique ID of the participant for which you want to generate an SSO token.","schema":{"type":"string"}},{"name":"lang","in":"query","required":false,"description":"Set the language for the participant logging into the marketplace.","schema":{"$ref":"#/components/schemas/LanguageEnum"}},{"name":"country","in":"query","required":false,"description":"Set the country for the participant logging into the marketplace.","schema":{"$ref":"#/components/schemas/CountryEnum"}},{"name":"redirect","in":"query","required":false,"description":"Set the redirect URL for the participant logging into the marketplace. The value must be a base64 encoded path. For example, to redirect a participant to the privacy policy (/content/privacy_policy), the query string would be ?redirect=L2NvbnRlbnQvcHJpdmFjeV9wb2xpY3k=","schema":{"type":"string"}}],"responses":{"201":{"description":"SSO token generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParticipantSSO"}}}},"400":{"description":"Resource does not exist or participant not active."},"default":{"description":"Unknown exception"}}},"get":{"tags":["Participant > SSO"],"summary":"Validate a participant SSO token","description":"Returns a participant object if the SSO token is valid.","operationId":"validateSSOToken","security":[{"Bearer":[]}],"parameters":[{"name":"programId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}},{"name":"uniqueId","in":"path","required":true,"description":"Unique ID of participant.","schema":{"type":"string"}},{"name":"token","in":"query","required":true,"description":"SSO token to validate.","schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParticipantRead"}}}},"400":{"description":"Resource does not exist or no token match."}}}},"/api/program/{programId}/participant/{uniqueId}/meta":{"put":{"tags":["Participant"],"summary":"Replace all participant metadata.","description":"Completely replaces all existing participant metadata. Existing meta keys not present in the request body will be deleted.","operationId":"putParticipantMeta","security":[{"Bearer":[]}],"parameters":[{"name":"programId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}},{"name":"uniqueId","in":"path","required":true,"description":"Unique ID of participant.","schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/MetaArray"},"responses":{"200":{"description":"successful operation"},"400":{"description":"Invalid meta format or resource does not exist."}}},"patch":{"tags":["Participant"],"summary":"Add or Update one or more meta key pair values.","description":"Merges with existing metadata. Existing keys will be updated, new keys will be added. Keys not present in the request are left unchanged.","operationId":"patchParticipantMeta","security":[{"Bearer":[]}],"parameters":[{"name":"programId","in":"path","required":true,"description":"The Program unique_id.","schema":{"type":"string"}},{"name":"uniqueId","in":"path","required":true,"description":"Unique ID of participant.","schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/MetaArray"},"responses":{"200":{"description":"successful operation"},"400":{"description":"Invalid meta format or resource does not exist."}}}},"/api/program/{programId}/catalog":{"get":{"tags":["Program > Catalog"],"summary":"Catalog Search","operationId":"CatalogSearch","description":"Returns a paginated collection of products for the specified program.","parameters":[{"name":"programId","in":"path","required":true,"description":"The unique identifier of the program.","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"The page number for pagination.","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","required":false,"description":"The number of products to return per page. Allowed values are 10, 30, 50, 100.","schema":{"type":"integer","enum":[10,30,50,100],"default":30}},{"name":"filter[sku]","in":"query","required":false,"description":"Filter by product SKU(s). Can be a single SKU or an array of SKUs.","schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"filter[name]","in":"query","required":false,"description":"Filter by product name.","schema":{"type":"string"}},{"name":"filter[category]","in":"query","required":false,"description":"Filter by product category ID(s). Can be a single category or an array of categories.","schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"filter[brand]","in":"query","required":false,"description":"Filter by product brand ID(s). Can be a single brand or an array of brands.","schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"filter[group]","in":"query","required":false,"description":"Filter by product group ID(s). Can be a single group or an array of groups.","schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"filter[excluded_category]","in":"query","required":false,"description":"Exclude products by category ID(s). Can be a single category or an array of categories.","schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"filter[excluded_brand]","in":"query","required":false,"description":"Exclude products by brand ID(s). Can be a single brand or an array of brands.","schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"filter[excluded_group]","in":"query","required":false,"description":"Exclude products by group ID(s). Can be a single group or an array of groups.","schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"filter[price][min]","in":"query","required":false,"description":"Filter products by minimum price.","schema":{"type":"number","format":"float"}},{"name":"filter[price][max]","in":"query","required":false,"description":"Filter products by maximum price.","schema":{"type":"number","format":"float"}},{"name":"filter[ranged]","in":"query","required":false,"description":"Filter products by whether the price is ranged (true) or a fixed value (false).","schema":{"type":"boolean"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer","description":"Current page number."},"page_size":{"type":"integer","description":"The number of products per page."},"total_count":{"type":"integer","description":"The total number of products matching the query."},"total_page_count":{"type":"integer","description":"The total number of pages based on the total count and page size."},"data":{"type":"array","items":{"$ref":"#/components/schemas/CatalogProduct"}}}}}}},"default":{"description":"Unknown exception"}}}},"/api/program/{programId}/service-award":{"get":{"tags":["Service Award"],"summary":"List service awards for a program","operationId":"getServiceAwardList","security":[{"Bearer":[]}],"description":"Returns a paginated collection of service awards configured for the specified program.","parameters":[{"name":"programId","in":"path","required":true,"description":"The unique identifier of the program.","schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","required":false,"description":"Request a specific page number starting with page 1.","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Set the number of desired results per page.","schema":{"type":"integer","default":30}},{"name":"filters[active]","in":"query","required":false,"description":"Filter by active status (0 or 1).","schema":{"type":"integer","enum":[0,1]}},{"name":"filters[reward_type]","in":"query","required":false,"description":"Filter by reward type. 1 = points, 2 = product SKU.","schema":{"type":"integer","enum":[1,2]}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ServiceAward"}}}}}}},"400":{"description":"Missing or invalid program identifier","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"default":{"description":"Unknown exception"}}},"post":{"tags":["Service Award"],"summary":"Create a new service award","operationId":"createServiceAward","security":[{"Bearer":[]}],"description":"Create a new service award for the specified program. The award defines the reward type, value, trigger schedule, and optional email notifications.","parameters":[{"name":"programId","in":"path","required":true,"description":"The unique identifier of the program.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAwardCreate"}}}},"responses":{"201":{"description":"Service award created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAward"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"default":{"description":"Unknown exception"}}}},"/api/program/{programId}/service-award/{serviceAwardId}":{"get":{"tags":["Service Award"],"summary":"Retrieve a single service award","operationId":"getServiceAward","security":[{"Bearer":[]}],"description":"Returns a single service award by its unique identifier.","parameters":[{"name":"programId","in":"path","required":true,"description":"The unique identifier of the program.","schema":{"type":"string","format":"uuid"}},{"name":"serviceAwardId","in":"path","required":true,"description":"The unique identifier of the service award.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAward"}}}},"404":{"description":"Service award not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"default":{"description":"Unknown exception"}}},"put":{"tags":["Service Award"],"summary":"Update a service award","operationId":"updateServiceAward","security":[{"Bearer":[]}],"description":"Update an existing service award. Awards that have already issued fulfillments cannot be modified.","parameters":[{"name":"programId","in":"path","required":true,"description":"The unique identifier of the program.","schema":{"type":"string","format":"uuid"}},{"name":"serviceAwardId","in":"path","required":true,"description":"The unique identifier of the service award.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAwardUpdate"}}}},"responses":{"200":{"description":"Service award updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAward"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"404":{"description":"Service award not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Award cannot be modified because it has completed fulfillments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"default":{"description":"Unknown exception"}}},"delete":{"tags":["Service Award"],"summary":"Delete a service award","operationId":"deleteServiceAward","security":[{"Bearer":[]}],"description":"Delete a service award and its associated participant data.","parameters":[{"name":"programId","in":"path","required":true,"description":"The unique identifier of the program.","schema":{"type":"string","format":"uuid"}},{"name":"serviceAwardId","in":"path","required":true,"description":"The unique identifier of the service award.","schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Service award deleted"},"404":{"description":"Service award not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"default":{"description":"Unknown exception"}}}},"/api/program/{programId}/service-award/{serviceAwardId}/participant":{"get":{"tags":["Service Award"],"summary":"List participants enrolled in a service award","operationId":"getServiceAwardParticipants","security":[{"Bearer":[]}],"description":"Returns a paginated list of participants enrolled in the specified service award, including their milestone date and fulfillment history.","parameters":[{"name":"programId","in":"path","required":true,"description":"The unique identifier of the program.","schema":{"type":"string","format":"uuid"}},{"name":"serviceAwardId","in":"path","required":true,"description":"The unique identifier of the service award.","schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","required":false,"description":"Request a specific page number starting with page 1.","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Set the number of desired results per page.","schema":{"type":"integer","default":30}},{"name":"filters[participant_id]","in":"query","required":false,"description":"Filter results by a specific participant unique identifier.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ServiceAwardParticipant"}}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"default":{"description":"Unknown exception"}}},"post":{"tags":["Service Award"],"summary":"Enroll participants in a service award","operationId":"bulkUpsertServiceAwardParticipants","security":[{"Bearer":[]}],"description":"Enroll one or more participants in a service award by providing their unique identifier and milestone date (e.g. hire date). If a participant is already enrolled, their date will be updated. Participants are validated against the program before enrollment. If the award has issuance emails enabled, enrolled participants will receive a notification.","parameters":[{"name":"programId","in":"path","required":true,"description":"The unique identifier of the program.","schema":{"type":"string","format":"uuid"}},{"name":"serviceAwardId","in":"path","required":true,"description":"The unique identifier of the service award.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ServiceAwardParticipantWrite"}},"example":[{"participant_id":"participant-unique-id-1","date":"2020-03-15"},{"participant_id":"participant-unique-id-2","date":"2021-06-01"}]}}},"responses":{"201":{"description":"All participants enrolled successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAwardBulkResponse"}}}},"207":{"description":"Partial success — some participants failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAwardBulkResponse"}}}},"400":{"description":"Validation error (e.g. missing required fields or invalid date format)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"default":{"description":"Unknown exception"}}}},"/api/program/{programId}/milestone":{"get":{"tags":["Milestone"],"summary":"Retrieve milestone collection with optional filters","operationId":"getMilestoneList","security":[{"Bearer":[]}],"description":"Returns paginated collection of milestones for the specified program.","parameters":[{"name":"programId","in":"path","required":true,"description":"The Program Unique Identifier.","schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","required":false,"description":"Request a specific page number starting with page 1.","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","required":false,"description":"Set the number of desired results per page.","schema":{"type":"integer","default":10}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MilestoneRead"}},"current_page":{"type":"integer","description":"Current page number."},"total_count":{"type":"integer","description":"The total number of milestones."}}}}}},"default":{"description":"Unknown exception"}}},"post":{"tags":["Milestone"],"summary":"Add a new milestone.","operationId":"addMilestone","security":[{"Bearer":[]}],"parameters":[{"name":"programId","in":"path","required":true,"description":"The Program Unique Identifier.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MilestoneCreate"}}},"description":"Milestone object to add to the program.","required":true},"responses":{"201":{"description":"Create a new milestone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MilestoneRead"}}}},"default":{"description":"Unknown exception"}}}},"/api/program/{programId}/milestone/{milestoneId}":{"get":{"tags":["Milestone"],"summary":"Find a milestone by ID","operationId":"getMilestone","security":[{"Bearer":[]}],"description":"Returns a single milestone with its activities.","parameters":[{"name":"programId","in":"path","required":true,"description":"The Program Unique Identifier.","schema":{"type":"string","format":"uuid"}},{"name":"milestoneId","in":"path","required":true,"description":"The Milestone Unique Identifier.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MilestoneRead"}}}},"404":{"description":"Milestone not found."},"default":{"description":"Unknown exception"}}},"patch":{"tags":["Milestone"],"summary":"Updates a milestone.","operationId":"updateMilestone","security":[{"Bearer":[]}],"parameters":[{"name":"programId","in":"path","required":true,"description":"The Program Unique Identifier.","schema":{"type":"string","format":"uuid"}},{"name":"milestoneId","in":"path","required":true,"description":"The Milestone Unique Identifier.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MilestoneUpdate"}}},"description":"Milestone object to update.","required":true},"responses":{"200":{"description":"Milestone updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MilestoneRead"}}}},"404":{"description":"Milestone not found."},"default":{"description":"Unknown exception"}}}},"/api/program/{programId}/milestone/{milestoneId}/activity":{"post":{"tags":["Milestone > Activity"],"summary":"Add a new activity to a milestone.","operationId":"addActivity","security":[{"Bearer":[]}],"parameters":[{"name":"programId","in":"path","required":true,"description":"The Program Unique Identifier.","schema":{"type":"string","format":"uuid"}},{"name":"milestoneId","in":"path","required":true,"description":"The Milestone Unique Identifier.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityCreate"}}},"description":"Activity object to add to the milestone.","required":true},"responses":{"201":{"description":"Create a new activity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityRead"}}}},"default":{"description":"Unknown exception"}}},"get":{"tags":["Milestone > Activity"],"summary":"Retrieve all activities for a milestone","operationId":"getActivityList","security":[{"Bearer":[]}],"description":"Returns array of activities for the specified milestone.","parameters":[{"name":"programId","in":"path","required":true,"description":"The Program Unique Identifier.","schema":{"type":"string","format":"uuid"}},{"name":"milestoneId","in":"path","required":true,"description":"The Milestone Unique Identifier.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActivityRead"}}}}},"default":{"description":"Unknown exception"}}}},"/api/program/{programId}/milestone/{milestoneId}/activity/{activityId}":{"patch":{"tags":["Milestone > Activity"],"summary":"Updates an activity.","operationId":"updateActivity","security":[{"Bearer":[]}],"parameters":[{"name":"programId","in":"path","required":true,"description":"The Program Unique Identifier.","schema":{"type":"string","format":"uuid"}},{"name":"milestoneId","in":"path","required":true,"description":"The Milestone Unique Identifier.","schema":{"type":"string","format":"uuid"}},{"name":"activityId","in":"path","required":true,"description":"The Activity Unique Identifier.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityUpdate"}}},"description":"Activity object to update.","required":true},"responses":{"200":{"description":"Activity updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityRead"}}}},"404":{"description":"Activity not found."},"default":{"description":"Unknown exception"}}},"delete":{"tags":["Milestone > Activity"],"summary":"Delete activity by ID","operationId":"deleteActivity","security":[{"Bearer":[]}],"description":"Remove an activity from a milestone.","parameters":[{"name":"programId","in":"path","required":true,"description":"The Program Unique Identifier.","schema":{"type":"string","format":"uuid"}},{"name":"milestoneId","in":"path","required":true,"description":"The Milestone Unique Identifier.","schema":{"type":"string","format":"uuid"}},{"name":"activityId","in":"path","required":true,"description":"The Activity Unique Identifier.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Activity deleted successfully"},"204":{"description":"Activity deleted successfully"},"404":{"description":"Activity not found."}}}},"/api/program/{programId}/milestone/{milestoneId}/participant":{"get":{"tags":["Milestone > Participant Progress"],"summary":"Retrieve list of participant progress for a milestone","operationId":"getParticipantProgressList","security":[{"Bearer":[]}],"description":"Returns array of participant progress for the specified milestone.","parameters":[{"name":"programId","in":"path","required":true,"description":"The Program Unique Identifier.","schema":{"type":"string","format":"uuid"}},{"name":"milestoneId","in":"path","required":true,"description":"The Milestone Unique Identifier.","schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","required":false,"description":"Request a specific page number starting with page 1.","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","required":false,"description":"Set the number of desired results per page.","schema":{"type":"integer","default":10}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ParticipantProgress"}}}}},"default":{"description":"Unknown exception"}}},"post":{"tags":["Milestone > Participant Progress"],"summary":"Bulk upsert participant progress","operationId":"bulkUpsertParticipantProgress","security":[{"Bearer":[]}],"description":"Create or update progress for multiple participants in bulk.","parameters":[{"name":"programId","in":"path","required":true,"description":"The Program Unique Identifier.","schema":{"type":"string","format":"uuid"}},{"name":"milestoneId","in":"path","required":true,"description":"The Milestone Unique Identifier.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"example":["participant-unique-id-1","participant-unique-id-2","participant-unique-id-3"]}}},"description":"Array of participant unique IDs to create or update progress for.","required":true},"responses":{"200":{"description":"Bulk operation completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertResponse"}}}},"201":{"description":"Bulk operation completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertResponse"}}}},"default":{"description":"Unknown exception"}}}},"/api/program/{programId}/milestone/{milestoneId}/participant/{participantId}":{"get":{"tags":["Milestone > Participant Progress"],"summary":"Retrieve detailed progress for a specific participant","operationId":"getParticipantProgress","security":[{"Bearer":[]}],"description":"Returns detailed progress information for a specific participant in a milestone.","parameters":[{"name":"programId","in":"path","required":true,"description":"The Program Unique Identifier.","schema":{"type":"string","format":"uuid"}},{"name":"milestoneId","in":"path","required":true,"description":"The Milestone Unique Identifier.","schema":{"type":"string","format":"uuid"}},{"name":"participantId","in":"path","required":true,"description":"The Participant Unique Identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParticipantProgressDetail"}}}},"404":{"description":"Participant progress not found."},"default":{"description":"Unknown exception"}}}},"/api/program/{programId}/milestone/{milestoneId}/participants/{participantId}/activity/{activityId}":{"patch":{"tags":["Milestone > Participant Progress"],"summary":"Mark an activity as complete or incomplete for a participant","operationId":"updateActivityCompletion","security":[{"Bearer":[]}],"description":"Update the completion status of a specific activity for a participant.","parameters":[{"name":"programId","in":"path","required":true,"description":"The Program Unique Identifier.","schema":{"type":"string","format":"uuid"}},{"name":"milestoneId","in":"path","required":true,"description":"The Milestone Unique Identifier.","schema":{"type":"string","format":"uuid"}},{"name":"participantId","in":"path","required":true,"description":"The Participant Unique Identifier.","schema":{"type":"string"}},{"name":"activityId","in":"path","required":true,"description":"The Activity Unique Identifier.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityCompletionUpdate"}}},"description":"Completion status update.","required":true},"responses":{"200":{"description":"Activity completion status updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityCompletionResponse"}}}},"404":{"description":"Participant progress or activity not found."},"default":{"description":"Unknown exception"}}}},"/api/batch/participant":{"post":{"tags":["Batch"],"summary":"Create many participants at once","operationId":"batchParticipant","security":[{"Bearer":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchParticipant"}}},"description":"Collection of participant objects to add to the marketplace.","required":true},"responses":{"201":{"description":"successful operation"},"default":{"description":"Unknown exception"}}}},"/api/batch/adjustment":{"post":{"tags":["Batch"],"summary":"Create many points adjustments at once","operationId":"batchAdjustent","security":[{"Bearer":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchAdjustment"}}},"description":"Collection of adjustment objects to add to the marketplace.","required":true},"responses":{"201":{"description":"successful operation"},"default":{"description":"Unknown exception"}}}},"/api/batch/transaction":{"post":{"tags":["Batch"],"summary":"Create many transactions at once","operationId":"batchTransaction","security":[{"Bearer":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchTransaction"}}},"description":"Collection of transaction objects to add to the marketplace.","required":true},"responses":{"201":{"description":"successful operation"},"default":{"description":"Unknown exception"}}}}},"components":{"requestBodies":{"WebhookCreate":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}},"required":true},"MetaArray":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Meta"}}}},"description":"Array of key-value meta objects.","required":true},"UserWrite":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWrite"}}},"description":"Participant object.","required":true}},"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic"},"Bearer":{"description":"For accessing the API, a valid JSON Web Token must be passed in all queries via the \"Authorization\" header. You may request a new JSON Web token at the following endpoint: /token, with the API User and Password credentials for the organization you are actioning.","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"JwtRequest":{"type":"object","description":"Token generation parameters. These are passed as query parameters, not in the JSON body.","properties":{"hoursUntilExpiry":{"type":"integer","description":"Number of hours until the token expires.","minimum":1,"maximum":8760,"default":2},"tokenName":{"type":"string","description":"Optional name for the token.","maxLength":255}}},"JwtResponse":{"type":"object","properties":{"token":{"type":"string","description":"The JWT token string (HS256 encoded)."},"expires":{"type":"integer","description":"Unix timestamp when the token expires."}}},"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}},"UserList":{"type":"object","description":"Participant object as returned in list responses. Address, meta, and birthdate are excluded from list views to reduce payload size. PII fields may be excluded for users with limited access.","properties":{"unique_id":{"type":"string","description":"Participant unique identifier.","minLength":2,"maxLength":45},"email_address":{"type":"string","description":"Participant email address."},"credit":{"type":"number","description":"The participant's earned (non-shareable) point balance."},"shared_credit":{"type":"number","description":"The participant's shareable point balance."},"firstname":{"type":"string","description":"Participant first name.","maxLength":50},"lastname":{"type":"string","description":"Participant last name.","maxLength":50},"phone":{"type":"string","description":"Participant phone number."},"active":{"type":"integer","description":"1 for active, 0 for inactive.","enum":[0,1]},"status":{"$ref":"#/components/schemas/UserStatusEnum"},"language":{"type":"string","description":"Language preference.","default":"en"},"transactions_disabled":{"type":"integer","description":"Whether transactions are disabled for this participant. 0 = enabled, 1 = disabled.","enum":[0,1]},"created_at":{"type":"string","description":"Creation timestamp (Y-m-d H:i:s)."},"updated_at":{"type":"string","description":"Last update timestamp (Y-m-d H:i:s)."},"deactivated_at":{"type":["string","null"],"description":"Deactivation timestamp (Y-m-d H:i:s), null if active."},"program":{"type":"string","description":"The assigned program unique_id."},"organization":{"type":"string","description":"The assigned organization unique_id."}}},"UserWrite":{"type":"object","description":"Participant create/update request body.","properties":{"email_address":{"type":"string","description":"Participant email address. Required on create. Must be a valid email format. Must be unique per program when email login is enabled."},"program":{"type":"string","description":"The program unique_id the participant belongs to. Required on create."},"unique_id":{"type":"string","description":"Participant unique identifier. Optional on create (auto-generated UUID if omitted). Cannot be changed on update. Alphanumeric with hyphens and underscores only.","minLength":2,"maxLength":45,"pattern":"^[a-zA-Z0-9_-]+$"},"firstname":{"type":"string","description":"Participant first name. No emojis allowed.","maxLength":50},"lastname":{"type":"string","description":"Participant last name. No emojis allowed.","maxLength":50},"phone":{"type":"string","description":"Participant phone number."},"birthdate":{"type":"string","description":"Participant birthdate in YYYY-MM-DD format.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"1990-01-15"},"password":{"type":"string","description":"Participant password. If provided, password_confirm must also be provided and match."},"password_confirm":{"type":"string","description":"Must match password if password is provided."},"active":{"type":"integer","description":"1 for active, 0 for inactive.","enum":[0,1],"default":1},"status":{"$ref":"#/components/schemas/UserStatusEnum"},"language":{"type":"string","description":"Language preference.","default":"en"},"address":{"$ref":"#/components/schemas/Address"},"meta":{"type":"array","description":"Array of key-value metadata pairs. On PUT, replaces all existing meta.","items":{"$ref":"#/components/schemas/Meta"}}}},"ParticipantRead":{"type":"object","description":"Full participant object returned on single-resource GET, create, and update responses. Includes address and meta data. PII fields may be excluded for users with limited access.","properties":{"unique_id":{"type":"string","description":"Participant unique identifier."},"email_address":{"type":"string","description":"Participant email address."},"credit":{"type":"number","description":"The participant's earned (non-shareable) point balance."},"shared_credit":{"type":"number","description":"The participant's shareable point balance. These points can be shared with other participants in the same program when point sharing is enabled."},"firstname":{"type":"string","description":"Participant first name."},"lastname":{"type":"string","description":"Participant last name."},"phone":{"type":"string","description":"Participant phone number."},"birthdate":{"type":"string","description":"Participant birthdate (YYYY-MM-DD)."},"active":{"type":"integer","description":"1 for active, 0 for inactive.","enum":[0,1]},"status":{"$ref":"#/components/schemas/UserStatusEnum"},"language":{"type":"string","description":"Language preference."},"transactions_disabled":{"type":"integer","description":"Whether transactions are disabled. 0 = enabled, 1 = disabled.","enum":[0,1]},"created_at":{"type":"string","description":"Creation timestamp (Y-m-d H:i:s)."},"updated_at":{"type":"string","description":"Last update timestamp (Y-m-d H:i:s)."},"deactivated_at":{"type":["string","null"],"description":"Deactivation timestamp, null if active."},"address":{"$ref":"#/components/schemas/Address"},"program":{"type":"string","description":"The assigned program unique_id."},"organization":{"type":"string","description":"The assigned organization unique_id."},"meta":{"type":"array","items":{"$ref":"#/components/schemas/Meta"}}}},"ParticipantSSO":{"type":"object","properties":{"token":{"type":"string","description":"The SSO token."},"redirect":{"type":"string","description":"The redirect URL, present if redirect parameter was provided."}}},"ProgramList":{"type":"object","description":"Program object as returned in list responses.","properties":{"unique_id":{"type":"string","description":"Program unique identifier.","maxLength":45},"name":{"type":"string","description":"The name of the program.","maxLength":125},"published":{"type":"integer","description":"1 is published, 0 is unpublished.","enum":[0,1]},"point":{"type":"number","description":"The point-to-USD ratio. e.g. 1 means 1 point = $1 USD.","minimum":1},"url":{"type":"string","description":"The full domain URL of the program (subdomain.domain)."},"active":{"type":"integer","description":"1 for active, 0 for inactive.","enum":[0,1]},"is_avs":{"type":"integer","description":"When 1, transactions created with shipping addresses will have their shipping addresses verified before creating the transaction.","enum":[0,1]},"enable_email_login":{"type":"integer","description":"1 = enabled, 0 = disabled. When enabled, participants can login to the marketplace using their email address and password.","enum":[0,1],"default":0},"grace_period":{"type":["integer","null"],"description":"The number of days after end_date that the program remains active."},"timezone":{"type":"string","description":"Program timezone. Options include: America/New_York, America/Chicago, America/Denver, America/Phoenix, America/Los_Angeles, America/Anchorage, America/Adak, Pacific/Honolulu.","default":"America/Phoenix"},"start_date":{"type":"string","description":"Program start date (YYYY-MM-DD)."},"end_date":{"type":"string","description":"Program end date (YYYY-MM-DD HH:MM:SS)."},"created_at":{"type":"string","description":"Creation timestamp (Y-m-d H:i:s)."},"updated_at":{"type":"string","description":"Last update timestamp (Y-m-d H:i:s)."},"organization":{"type":"string","description":"Organization unique_id."},"status":{"type":"string","description":"Program status derived from active field."},"meta":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Meta"}}}},"ProgramRead":{"type":"object","description":"Full program object returned on single-resource GET, create, and update responses.","properties":{"unique_id":{"type":"string","description":"Program unique identifier.","maxLength":45},"name":{"type":"string","description":"The name of the program.","maxLength":125},"published":{"type":"integer","description":"1 is published, 0 is unpublished.","enum":[0,1]},"collect_ssn":{"type":"integer","description":"1 is on, 0 is off.","enum":[0,1]},"is_avs":{"type":"integer","description":"When 1, transactions created with shipping addresses will have their shipping addresses verified before creating the transaction. When 0, address verification does not occur on the transaction shipping address. Regardless of this setting, AVS is always enabled in the marketplace UI.","enum":[0,1]},"point":{"type":"number","description":"The point-to-USD ratio. e.g. 1 means 1 point = $1 USD.","minimum":1},"url":{"type":"string","description":"The full domain URL of the program (subdomain.domain)."},"active":{"type":"integer","description":"1 for active, 0 for inactive.","enum":[0,1]},"point_sharing":{"type":"integer","description":"1 enables point sharing between participants, 0 disables it. When enabled, participants can share their shareable points with other participants in the same program.","enum":[0,1]},"has_shareable_points":{"type":"boolean","description":"Indicates whether the program has any shareable adjustments. When true, point_sharing cannot be disabled."},"share_link_label":{"type":"string","nullable":true,"description":"Custom label for the participant-facing share link."},"share_total_max":{"type":"number","nullable":true,"description":"Lifetime maximum a participant may share in this program. Null means no limit."},"share_per_transaction_max":{"type":"number","nullable":true,"description":"Maximum amount a participant may share in a single transaction. Null means no limit."},"share_daily_max":{"type":"number","nullable":true,"description":"Maximum amount a participant may share per day. Null means no limit."},"share_weekly_max":{"type":"number","nullable":true,"description":"Maximum amount a participant may share per week. Null means no limit."},"share_monthly_max":{"type":"number","nullable":true,"description":"Maximum amount a participant may share per month. Null means no limit."},"enable_email_login":{"type":"integer","description":"1 = enabled, 0 = disabled. When enabled, participants can login to the marketplace using their email address and password.","enum":[0,1],"default":0},"grace_period":{"type":["integer","null"],"description":"The number of days after end_date that the program remains active."},"timezone":{"type":"string","description":"Program timezone. Options include: America/New_York, America/Chicago, America/Denver, America/Phoenix, America/Los_Angeles, America/Anchorage, America/Adak, Pacific/Honolulu.","default":"America/Phoenix"},"start_date":{"type":"string","description":"Program start date (YYYY-MM-DD)."},"end_date":{"type":"string","description":"Program end date (YYYY-MM-DD HH:MM:SS)."},"created_at":{"type":"string","description":"Creation timestamp (Y-m-d H:i:s)."},"updated_at":{"type":"string","description":"Last update timestamp (Y-m-d H:i:s)."},"organization":{"type":"object","description":"The parent organization.","properties":{"unique_id":{"type":"string"},"name":{"type":"string"},"id":{"type":"integer"}}},"meta":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Meta"}},"cost_center_id":{"type":"string","description":"Cost center identifier.","maxLength":45},"accounting_id":{"type":["string","null"],"description":"Accounting identifier. Only superadmin/accounting roles can set this.","maxLength":45},"deposit_amount":{"type":"integer","description":"Deposit amount.","default":0},"low_level_deposit":{"type":"integer","description":"Low level deposit threshold.","default":0},"issue_1099":{"type":"integer","description":"1 is true, 0 is false.","enum":[0,1]},"employee_payroll_file":{"type":"integer","description":"1 is true, 0 is false.","enum":[0,1]},"contact":{"$ref":"#/components/schemas/Contact"},"accounting_contact":{"$ref":"#/components/schemas/Contact"},"productCriteria":{"$ref":"#/components/schemas/ProductCriteria"},"featured_products":{"type":"array","items":{"$ref":"#/components/schemas/ProductSku"}},"auto_redemption":{"$ref":"#/components/schemas/AutoRedemption"},"one_time_auto_redemptions":{"type":"array","items":{"$ref":"#/components/schemas/OneTimeAutoRedemption"}},"programTypes":{"type":"array","items":{"$ref":"#/components/schemas/ProgramType"}},"actions":{"$ref":"#/components/schemas/Actions"}}},"ProgramCreate":{"type":"object","required":["unique_id","name","point","Organization"],"properties":{"unique_id":{"type":"string","description":"Program unique identifier. Alphanumeric with hyphens and underscores only. No whitespace allowed.","minLength":1,"maxLength":45,"pattern":"^[a-zA-Z0-9_-]+$"},"name":{"type":"string","description":"The name of the program.","minLength":1,"maxLength":125},"point":{"type":"number","description":"The point-to-USD ratio. e.g. 1 means 1 point = $1 USD.","minimum":1},"organization":{"type":"string","description":"Organization unique_id to assign this program to."},"url":{"type":"string","description":"Full domain URL (subdomain.domain format)."},"active":{"type":"integer","description":"1 for active, 0 for inactive.","enum":[0,1],"default":1},"point_sharing":{"type":"integer","description":"1 enables point sharing between participants, 0 disables it. When enabled, adjustments can be marked as shareable and participants can share their shareable points with others.","enum":[0,1],"default":0},"share_total_max":{"type":"number","nullable":true,"description":"Lifetime maximum a participant may share in this program. Send null to clear the limit. Preserved if omitted."},"share_per_transaction_max":{"type":"number","nullable":true,"description":"Maximum amount a participant may share in a single transaction. Send null to clear the limit. Preserved if omitted."},"share_daily_max":{"type":"number","nullable":true,"description":"Maximum amount a participant may share per day. Send null to clear the limit. Preserved if omitted."},"share_weekly_max":{"type":"number","nullable":true,"description":"Maximum amount a participant may share per week. Send null to clear the limit. Preserved if omitted."},"share_monthly_max":{"type":"number","nullable":true,"description":"Maximum amount a participant may share per month. Send null to clear the limit. Preserved if omitted."},"published":{"type":"integer","description":"1 is published, 0 is unpublished.","enum":[0,1]},"start_date":{"type":"string","description":"Program start date (YYYY-MM-DD)."},"end_date":{"type":"string","description":"Program end date (YYYY-MM-DD HH:MM:SS)."},"grace_period":{"type":"integer","description":"The number of days after end_date that the program remains active."},"enable_email_login":{"type":"integer","description":"0 = Disabled, 1 = enabled. When enabled, participants can login to the marketplace using their email address and password.","enum":[0,1],"default":0},"timezone":{"type":"string","description":"Program timezone. Must be a valid timezone ID. Options include: America/New_York, America/Chicago, America/Denver, America/Phoenix, America/Los_Angeles, America/Anchorage, America/Adak, Pacific/Honolulu.","default":"America/Phoenix"},"collect_ssn":{"type":"integer","description":"1 to collect SSN, 0 to not.","enum":[0,1]},"is_avs":{"type":"integer","description":"1 to enable address verification on transactions, 0 to disable.","enum":[0,1],"default":0},"deposit_amount":{"type":"number","description":"Deposit amount."},"low_level_deposit":{"type":"number","description":"Low level deposit threshold."},"issue_1099":{"type":"integer","description":"1 is true, 0 is false.","enum":[0,1]},"employee_payroll_file":{"type":"integer","description":"1 is true, 0 is false.","enum":[0,1]},"cost_center_id":{"type":"string","description":"Cost center identifier.","maxLength":45},"accounting_id":{"type":["string","null"],"description":"Accounting identifier. Only superadmin/accounting roles can set this.","maxLength":45},"contact":{"$ref":"#/components/schemas/ContactWrite"},"accounting_contact":{"$ref":"#/components/schemas/ContactWrite"},"auto_redemption":{"type":"object","description":"Auto-redemption settings. product_sku is required if this object is provided.","properties":{"product_sku":{"type":"string","description":"SKU of the product for auto-redemption."},"active":{"type":"integer","enum":[0,1]},"all_participant":{"type":"integer","enum":[0,1]}}},"one_time_auto_redemptions":{"type":"array","items":{"type":"object","properties":{"sku":{"type":"string"},"active":{"type":"integer","enum":[0,1]},"participant_count":{"type":"integer"}}}},"programTypes":{"type":"array","description":"Array of program type IDs.","items":{"type":"integer"}}}},"ProgramUpdate":{"type":"object","description":"Program update request body. Only include fields you wish to change. unique_id cannot be changed. Setting active=0 also sets published=0.","properties":{"name":{"type":"string","description":"The name of the program.","minLength":1,"maxLength":125},"point":{"type":"number","description":"The point-to-USD ratio.","minimum":1},"url":{"type":"string","description":"Full domain URL (subdomain.domain format)."},"active":{"type":"integer","description":"1 for active, 0 for inactive. Setting to 0 also sets published to 0.","enum":[0,1]},"point_sharing":{"type":"integer","description":"1 enables point sharing between participants, 0 disables it. Cannot be disabled if shareable adjustments exist in the program.","enum":[0,1]},"share_total_max":{"type":"number","nullable":true,"description":"Lifetime maximum a participant may share in this program. Send null to clear the limit. Preserved if omitted."},"share_per_transaction_max":{"type":"number","nullable":true,"description":"Maximum amount a participant may share in a single transaction. Send null to clear the limit. Preserved if omitted."},"share_daily_max":{"type":"number","nullable":true,"description":"Maximum amount a participant may share per day. Send null to clear the limit. Preserved if omitted."},"share_weekly_max":{"type":"number","nullable":true,"description":"Maximum amount a participant may share per week. Send null to clear the limit. Preserved if omitted."},"share_monthly_max":{"type":"number","nullable":true,"description":"Maximum amount a participant may share per month. Send null to clear the limit. Preserved if omitted."},"published":{"type":"integer","description":"1 is published, 0 is unpublished.","enum":[0,1]},"start_date":{"type":"string","description":"Program start date (YYYY-MM-DD)."},"end_date":{"type":"string","description":"Program end date (YYYY-MM-DD HH:MM:SS)."},"grace_period":{"type":"integer","description":"Days after end_date that the program remains active."},"enable_email_login":{"type":"integer","description":"0 = Disabled, 1 = enabled.","enum":[0,1]},"timezone":{"type":"string","description":"Program timezone. Must be a valid timezone ID."},"collect_ssn":{"type":"integer","enum":[0,1]},"is_avs":{"type":"integer","enum":[0,1]},"deposit_amount":{"type":"number"},"low_level_deposit":{"type":"number"},"issue_1099":{"type":"integer","enum":[0,1]},"employee_payroll_file":{"type":"integer","enum":[0,1]},"cost_center_id":{"type":"string","maxLength":45},"accounting_id":{"type":["string","null"],"description":"Only superadmin/accounting roles can modify this.","maxLength":45},"contact":{"$ref":"#/components/schemas/ContactWrite"},"accounting_contact":{"$ref":"#/components/schemas/ContactWrite"},"auto_redemption":{"type":"object","properties":{"product_sku":{"type":"string"},"active":{"type":"integer","enum":[0,1]},"all_participant":{"type":"integer","enum":[0,1]}}},"one_time_auto_redemptions":{"type":"array","items":{"type":"object","properties":{"sku":{"type":"string"},"active":{"type":"integer","enum":[0,1]},"participant_count":{"type":"integer"}}}},"programTypes":{"type":"array","items":{"type":"integer"}}}},"ProgramMetrics":{"description":"Basic program metrics.","type":"object","properties":{"participant_total":{"description":"Total number of active participants.","type":"integer"},"transaction_total":{"description":"Total number of transactions.","type":"integer"},"adjustment_total":{"description":"Total number of point adjustments.","type":"integer"}}},"OrganizationList":{"type":"object","description":"Organization object as returned in list responses.","properties":{"unique_id":{"type":"string","description":"The unique identifier of the organization.","minLength":2,"maxLength":45,"pattern":"^[a-zA-Z0-9_-]+$"},"name":{"type":"string","description":"The name of the organization.","minLength":2,"maxLength":50},"industry_program":{"$ref":"#/components/schemas/IndustryProgramEnum"},"program_count":{"description":"The number of programs configured under this organization.","type":"integer"},"active":{"type":"integer","description":"1 for active, 0 for inactive.","enum":[0,1]},"parent":{"type":["string","null"],"description":"Parent organization unique_id."},"domains":{"type":"array","description":"Domain URLs associated with this organization.","items":{"type":"string"}},"created_at":{"type":"string","description":"Creation timestamp (Y-m-d H:i:s)."},"updated_at":{"type":"string","description":"Last update timestamp (Y-m-d H:i:s)."}}},"OrganizationRead":{"type":"object","description":"Full organization object.","properties":{"unique_id":{"type":"string","description":"The unique identifier of the organization.","minLength":2,"maxLength":45},"parent":{"type":["string","null"],"description":"The parent organization unique_id."},"name":{"type":"string","description":"The name of the organization.","minLength":2,"maxLength":50},"created_at":{"type":"string","description":"Creation timestamp (Y-m-d H:i:s)."},"updated_at":{"type":"string","description":"Last update timestamp (Y-m-d H:i:s)."},"domains":{"type":"array","description":"Domain URLs associated with this organization. Each domain must match the pattern for a valid domain URL and be unique across all organizations.","items":{"type":"string"}},"industry_program":{"$ref":"#/components/schemas/IndustryProgramEnum"},"active":{"type":"integer","description":"1 for active, 0 for inactive.","enum":[0,1]},"program_count":{"type":"integer","description":"The number of programs configured under this organization."},"company_contact":{"$ref":"#/components/schemas/Contact"},"accounts_payable_contact":{"$ref":"#/components/schemas/Contact"}}},"OrganizationCreate":{"type":"object","required":["unique_id","name","parent"],"properties":{"unique_id":{"type":"string","description":"The unique identifier for the organization. Alphanumeric with hyphens and underscores only.","minLength":2,"maxLength":45,"pattern":"^[a-zA-Z0-9_-]+$"},"parent":{"type":"string","description":"The parent organization unique_id. Required. Must reference an existing organization. Cannot create circular references."},"name":{"type":"string","description":"The name of the organization.","minLength":2,"maxLength":50},"domains":{"type":"array","description":"Domain URLs to associate with this organization. Each must be a valid domain URL and unique across all organizations. Converted to lowercase.","items":{"type":"string"}},"industry_program":{"$ref":"#/components/schemas/IndustryProgramEnum"},"company_contact":{"$ref":"#/components/schemas/ContactWrite"},"accounts_payable_contact":{"$ref":"#/components/schemas/ContactWrite"}}},"OrganizationUpdate":{"type":"object","description":"Organization update request body. Only include fields you wish to change. unique_id and parent cannot be changed on update (they will be silently ignored).","properties":{"name":{"type":"string","description":"The name of the organization.","minLength":1,"maxLength":50},"domains":{"type":"array","description":"Replaces all existing domains. Each must be a valid domain URL and unique across all organizations.","items":{"type":"string"}},"industry_program":{"description":"Industry program type. Can only be set once; cannot be unset after initial assignment.","$ref":"#/components/schemas/IndustryProgramEnum"},"company_contact":{"$ref":"#/components/schemas/ContactWrite"},"accounts_payable_contact":{"$ref":"#/components/schemas/ContactWrite"}}},"WebhookCreate":{"type":"object","required":["title","url","event"],"properties":{"title":{"type":"string","description":"Webhook title.","minLength":1,"maxLength":255},"url":{"type":"string","description":"URL the webhook POSTs data to. Must start with https:// and be between 11 and 255 characters. Cannot point to private/reserved IP addresses.","minLength":11,"maxLength":255},"event":{"type":"string","description":"Which event triggers this webhook (e.g. Transaction.create).","minLength":1,"maxLength":255},"auth_type":{"type":["string","null"],"description":"Authentication type for the webhook endpoint.","enum":["Bearer","Basic"]},"username":{"type":["string","null"],"description":"Username for basic authentication."},"password":{"type":["string","null"],"description":"Password for basic authentication."},"active":{"type":"integer","description":"Is this webhook active? 0 = false, 1 = true.","enum":[0,1]},"immutable":{"type":"integer","description":"Can this webhook be modified? 0 = mutable, 1 = immutable.","enum":[0,1]}}},"WebhookRead":{"type":"object","properties":{"id":{"type":"integer","description":"The unique identifier of the webhook."},"title":{"type":"string","description":"Webhook title."},"url":{"type":"string","description":"URL the webhook POSTs data to."},"event":{"type":"string","description":"Which event triggers this webhook."},"auth_type":{"type":["string","null"],"description":"Authentication type (Bearer or Basic)."},"active":{"type":"integer","description":"Is this webhook active? 0 = false, 1 = true.","enum":[0,1]},"immutable":{"type":"integer","description":"Can this webhook be modified? 0 = mutable, 1 = immutable.","enum":[0,1]},"created_at":{"type":"string","description":"Creation timestamp (Y-m-d H:i:s)."}}},"WebhookLogs":{"type":"object","properties":{"webhookLogs":{"type":"array","items":{"$ref":"#/components/schemas/WebhookLog"}}}},"WebhookLog":{"type":"object","properties":{"_id":{"type":"object","properties":{"$oid":{"type":"string","description":"MongoDB ObjectId."}}},"request_time":{"type":"object"},"http_status":{"type":"integer","description":"Most recent HTTP status response from the webhook's last attempt."},"responses":{"type":"array","items":{"$ref":"#/components/schemas/httpResponse"}},"request":{"$ref":"#/components/schemas/httpRequest"}}},"WebhookReplayResponse":{"type":"object","properties":{"http_status_code":{"description":"The HTTP response status code from the server the webhook was replayed to, or the string \"Failed\" if the connection failed.","oneOf":[{"type":"integer"},{"type":"string","enum":["Failed"]}]}}},"httpRequest":{"type":"object","properties":{"headers":{"type":"object","description":"Request headers (Authorization header is stripped)."},"body":{"type":"string"}}},"httpResponse":{"allOf":[{"$ref":"#/components/schemas/httpRequest"},{"type":"object","properties":{"http_status":{"type":"integer"}}}]},"CreateTransaction":{"type":"object","required":["products"],"properties":{"products":{"type":"array","description":"Array of products for the transaction. At least one product is required.","items":{"$ref":"#/components/schemas/ProductForTransaction"}},"issue_points":{"type":"boolean","description":"When true, credits the participant with enough points to cover the transaction cost before processing. Defaults to false.","default":false},"shipping":{"$ref":"#/components/schemas/Address"},"email_address":{"type":"string","description":"Email address for the transaction. Must be a valid email. Required for digital products if participant has no email on file."},"phone":{"type":"string","description":"Phone number for the transaction. Must be a valid phone number if provided."},"unique_id":{"type":"string","description":"Optional transaction unique identifier."},"transaction_source":{"type":"string","description":"Transaction source identifier. Reserved values (AUTO_REDEMPTION, MARKETPLACE, CUSTOMER_SERVICE, GAMES, KIA_KASH, REDEMPTION_CAMPAIGNS, SWEEPSTAKE) cannot be used unless the caller is a superadmin."},"avs_disabled":{"type":"boolean","description":"When true, disables Address Verification Service for this transaction even if the program has AVS enabled. Defaults to false.","default":false},"meta":{"type":"array","items":{"$ref":"#/components/schemas/Meta"}}}},"Transaction":{"type":"object","properties":{"id":{"type":"integer"},"unique_id":{"type":"string"},"participant_id":{"type":"integer"},"wholesale":{"type":"number","format":"float"},"subtotal":{"type":"number","format":"float"},"total":{"type":"number","format":"float"},"points":{"type":"number","format":"float","description":"Total points cost (total * program point ratio)."},"email_address":{"type":"string"},"phone":{"type":"string"},"type":{"type":"integer","description":"Transaction type."},"status":{"type":"string","description":"Transaction status."},"created_at":{"type":"string"},"updated_at":{"type":"string"},"shipping":{"$ref":"#/components/schemas/TransactionAddressRead"},"meta":{"type":"array","items":{"$ref":"#/components/schemas/Meta"}},"products":{"type":"array","items":{"$ref":"#/components/schemas/TransactionProductRead"}},"user":{"$ref":"#/components/schemas/ParticipantRead"}}},"TransactionProductRead":{"type":"object","properties":{"name":{"type":"string"},"sku":{"type":"string"},"quantity":{"type":"integer"},"total":{"type":"number","format":"float"},"points":{"type":"number","format":"float"},"guid":{"type":"string","description":"Unique GUID for this transaction item."},"reissue_date":{"type":"string","description":"Reissue date (YYYY-MM-DD)."},"returned":{"type":"integer","description":"1 if item has been returned, 0 if not.","enum":[0,1]},"var_amount":{"type":"number","format":"float","description":"Variable amount for ranged-price products."},"program_fee":{"type":"number","format":"float"},"terms_approved":{"type":"string"},"is_digital":{"type":"integer","description":"1 for digital, 0 for physical.","enum":[0,1]},"is_wallet_enabled":{"type":"integer","description":"1 if wallet enabled, 0 if not.","enum":[0,1]}}},"ProductForTransaction":{"type":"object","required":["sku","quantity"],"properties":{"sku":{"type":"string","description":"Product SKU (converted to uppercase)."},"quantity":{"type":"integer","description":"Quantity to order. Must be greater than 0.","minimum":1},"amount":{"type":"number","description":"Required for ranged-price products. The dollar amount to apply. Must be within the product's min/max price range."}}},"ParticipantIdArray":{"type":"object","required":["participant_id"],"properties":{"participant_id":{"type":"array","description":"Array of participant unique IDs to fetch.","items":{"type":"string"},"example":["UNIQUE_ID1","UNIQUE_ID2","UNIQUE_ID3"]}}},"Meta":{"type":"object","description":"A single key-value metadata pair. The key is the property name and the value is its value.","additionalProperties":{"type":"string"},"example":{"department":"Engineering"}},"ProductSku":{"type":"string"},"Address":{"type":"object","properties":{"firstname":{"type":"string","description":"Recipient first name. Required for physical product shipments."},"lastname":{"type":"string","description":"Recipient last name."},"address1":{"type":"string","description":"Street address line 1."},"address2":{"type":"string","description":"Street address line 2."},"city":{"type":"string","description":"City."},"state":{"type":"string","description":"State abbreviation (e.g. NY). Required for US shipments with physical items."},"zip":{"type":"string","description":"Postal/ZIP code."},"country_code":{"type":"string","description":"Two-letter country code (e.g. US, CA).","maxLength":2,"default":"US"}}},"TransactionAddressRead":{"type":"object","properties":{"firstname":{"type":"string"},"lastname":{"type":"string"},"address1":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"country":{"type":"string","description":"Country name or code."},"country_code":{"type":"string","description":"Two-letter country code."}}},"PointRead":{"type":"object","properties":{"id":{"type":"integer"},"amount":{"type":"number","description":"Point amount (displayed as amount * program point ratio)."},"type":{"type":"string","description":"\"credit\" to add points, \"debit\" to subtract points.","enum":["credit","debit"]},"reference":{"type":"string","description":"Reference identifier for client internal use."},"description":{"type":"string","description":"Description visible to the participant."},"shareable":{"type":"integer","description":"1 indicates the adjustment affects shareable points, 0 indicates it affects earned (non-shareable) points. Shareable points can be transferred to other participants when point sharing is enabled.","enum":[0,1]},"created_at":{"type":"string","description":"Creation timestamp (Y-m-d H:i:s)."},"updated_at":{"type":"string","description":"Last update timestamp (Y-m-d H:i:s)."},"transaction_id":{"type":["integer","null"],"description":"Associated transaction ID, null for manual adjustments."},"transaction_item_id":{"type":["integer","null"]},"completed_at":{"type":["string","null"],"description":"Date the activity was completed (YYYY-MM-DD)."},"activity":{"type":["string","null"],"description":"Activity label for the adjustment."},"status":{"type":"string","description":"Adjustment status."}}},"PointReadWithUser":{"allOf":[{"$ref":"#/components/schemas/PointRead"},{"type":"object","properties":{"user":{"$ref":"#/components/schemas/ParticipantRead"}}}]},"PointWrite":{"type":"object","required":["amount","type"],"properties":{"amount":{"type":"number","description":"Point amount. Must be positive and non-empty. Credit adjustments cannot cause the total to exceed 99999999.99.","minimum":0,"exclusiveMinimum":true},"type":{"type":"string","description":"\"credit\" to add points, \"debit\" to subtract points.","enum":["credit","debit"]},"reference":{"type":"string","description":"Reference identifier for client use."},"completed_at":{"type":"string","description":"YYYY-MM-DD. Optional reference to the date a participant completed the activity to receive the points. This can be used if the date the points are credited via the API is after the date the participant earned the points."},"description":{"type":"string","description":"Description visible to participant."},"activity":{"type":"string","description":"Activity label for the adjustment."},"shareable":{"type":"integer","description":"Set to 1 to mark this adjustment as shareable. Shareable points are added to the participant's shared_credit balance and can be transferred to other participants. Requires point_sharing to be enabled on the program. Default is 0 (non-shareable).","enum":[0,1],"default":0}}},"PointUpdate":{"type":"object","description":"Update adjustment metadata. Amount and type cannot be changed after creation.","properties":{"reference":{"type":"string","description":"Reference identifier for client use."},"completed_at":{"type":"string","description":"YYYY-MM-DD. Optional reference to the date a participant completed the activity to receive the points."},"description":{"type":"string","description":"Description visible to participant."},"activity":{"type":"string","description":"Activity label for the adjustment."}}},"SharePointsRequest":{"type":"object","description":"Request body for sharing points between participants.","required":["recipient_email","amount"],"properties":{"recipient_email":{"type":"string","format":"email","description":"Email address of the participant receiving the points. Must be an active participant in the same program as the sharer."},"amount":{"type":"number","minimum":0.01,"description":"Amount of shareable points to transfer. Must be greater than zero and cannot exceed the sharer's shared_credit balance."},"message":{"type":"string","maxLength":255,"description":"Optional message to accompany the share. Trimmed and truncated to 255 characters."}}},"SharePointsResponse":{"type":"object","description":"Response body after successfully sharing points.","properties":{"credit":{"type":"number","description":"The sharer's remaining earned (non-shareable) point balance."},"shared_credit":{"type":"number","description":"The sharer's remaining shareable point balance after the transfer."}}},"ReturnRead":{"type":"object","properties":{"id":{"type":"integer"},"guid":{"type":"string","description":"Return GUID."},"notes":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user":{"$ref":"#/components/schemas/ReturnUserRead"},"item":{"$ref":"#/components/schemas/ReturnItemRead"},"participant":{"$ref":"#/components/schemas/ParticipantRead"}}},"ReturnUserRead":{"type":"object","description":"The admin user who processed the return.","properties":{"id":{"type":"integer"},"email":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"ReturnItemRead":{"type":"object","properties":{"transaction_id":{"type":"integer","description":"The transaction ID of the item returned."},"sku":{"type":"string"},"guid":{"type":"string","description":"The GUID of the transaction item."},"quantity":{"type":"integer","description":"The quantity of item returned."}}},"UserStatusEnum":{"type":"string","description":"Acceptable participant statuses: ACTIVE, HOLD (still active), INACTIVE, CANCELLED (sets inactive and zeros out points), DATADEL (sets inactive and deletes user PII - can only be set via DELETE endpoint).","enum":["ACTIVE","HOLD","INACTIVE","CANCELLED","SUSPENDED"]},"IndustryProgramEnum":{"type":"integer","description":"Industry program types: 1 = Health_Wellness, 2 = Channel_Sales, 3 = Employee_Recognition, 4 = Consumer, 5 = Market_Research, 6 = Loyalty_Marketing, 7 = Rebates.","enum":[1,2,3,4,5,6,7]},"LanguageEnum":{"type":"string","enum":["en_US","es_US"],"description":"Language options: en_US = English, es_US = Spanish."},"CountryEnum":{"type":"string","description":"Supported country codes.","enum":["US","CA","MX","ES","DE","IN","JP","KR","IT","MY","NL","BR","RU","CN"]},"Contact":{"type":"object","description":"Contact information (read response).","properties":{"firstname":{"type":"string"},"lastname":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"address1":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string","description":"State abbreviation (e.g. NY)."},"zip":{"type":"string"}}},"ContactWrite":{"type":"object","description":"Contact information for create/update requests.","properties":{"firstname":{"type":"string","description":"Contact first name.","minLength":1,"maxLength":50},"lastname":{"type":"string","description":"Contact last name.","minLength":1,"maxLength":50},"phone":{"type":"string","description":"Contact phone number.","minLength":10,"maxLength":255},"email":{"type":"string","description":"Contact email address. Must be a valid email format."},"address1":{"type":"string","description":"Street address line 1.","minLength":1,"maxLength":255},"address2":{"type":"string","description":"Street address line 2.","maxLength":50},"city":{"type":"string","description":"City.","minLength":1,"maxLength":155},"state":{"type":"string","description":"State abbreviation (e.g. NY).","minLength":1,"maxLength":3},"zip":{"type":"string","description":"Postal/ZIP code. Must be a valid US postal code format."}}},"AutoRedemption":{"type":"object","properties":{"product_sku":{"type":"string"},"interval":{"type":"integer"},"schedule":{"type":"string"},"all_participant":{"type":"integer","description":"1 for true, 0 for false.","enum":[0,1]},"id":{"type":"integer"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"active":{"type":"integer","description":"1 for true, 0 for false.","enum":[0,1]},"program_id":{"type":"integer"}}},"OneTimeAutoRedemption":{"type":"object","properties":{"product_sku":{"type":"string"},"interval":{"type":"integer"},"all_participant":{"type":"integer","description":"1 for true, 0 for false.","enum":[0,1]},"id":{"type":"integer"},"redemption_date":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"active":{"type":"integer","description":"1 for true, 0 for false.","enum":[0,1]},"program_id":{"type":"string"}}},"ProgramType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"is_active":{"type":"boolean"}}},"Actions":{"type":"object","properties":{"autoRedemption":{"type":"boolean"},"product":{"type":"boolean"},"vendor":{"type":"boolean"},"layout":{"type":"boolean"},"sweepstake":{"type":"boolean"},"content":{"type":"boolean"},"offlineRedemption":{"type":"boolean"},"fileUpload":{"type":"boolean"},"redemptionCampaigns":{"type":"boolean"},"programParticipantConfig":{"type":"boolean"}}},"Price":{"type":"object","properties":{"min":{"type":"integer"},"max":{"type":"integer"}}},"Brand":{"type":"object","properties":{"unique_id":{"type":"string"},"name":{"type":"string"},"active":{"type":"integer","description":"1 for true, 0 for false.","enum":[0,1]}}},"Category":{"type":"object","properties":{"name":{"type":"string"},"unique_id":{"type":"string"},"id":{"type":"integer"}}},"Product":{"type":"object","properties":{"sku":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"terms":{"type":"string"},"active":{"type":"integer","description":"1 for true, 0 for false.","enum":[0,1]},"vendor":{"type":"string"},"vendor_product_id":{"type":"string"},"digital":{"type":"integer","description":"1 for digital, 0 for physical.","enum":[0,1]},"category":{"$ref":"#/components/schemas/Category"},"brand":{"$ref":"#/components/schemas/Category"},"group":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"price_ranged":{"type":"integer","description":"1 for ranged price, 0 for fixed price.","enum":[0,1]},"price_ranged_min":{"type":"number","format":"float"},"price_ranged_max":{"type":"number","format":"float"},"price_wholesale":{"type":"number","format":"float"},"price_retail":{"type":"number","format":"float"},"price_shipping":{"type":"number","format":"float"},"price_handling":{"type":"number","format":"float"},"price_total":{"type":"number","format":"float"},"source":{"type":"string"},"manage_inventory":{"type":"integer","description":"1 for true, 0 for false.","enum":[0,1]},"inventory_count":{"type":"integer"},"tax_exempt":{"type":"integer","description":"1 for true, 0 for false.","enum":[0,1]},"meta":{"type":"array","items":{"$ref":"#/components/schemas/Meta"}}}},"ProductCriteria":{"type":"object","properties":{"price":{"$ref":"#/components/schemas/Price"},"categories":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"brands":{"type":"array","items":{"$ref":"#/components/schemas/Brand"}},"groups":{"type":"array","items":{"type":"string"}},"exclude_products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"exclude_brands":{"type":"array","items":{"$ref":"#/components/schemas/Brand"}},"exclude_vendors":{"type":"array","items":{"type":"string"}},"featured_page_title":{"type":"string"}}},"ShippingData":{"type":"object","description":"Shipping tracking information for a transaction item.","properties":{"guid":{"type":"string","description":"The unique identifier for the transaction item."},"tracking_number":{"type":"string","description":"The shipment tracking number."},"carrier":{"type":"string","description":"The shipping carrier (e.g., UPS, FedEx, USPS)."},"status":{"type":"object","description":"The current shipping status.","properties":{"status":{"type":"string","description":"The delivery status of the shipment.","enum":["processing","shipped","delivered"]},"status_date":{"type":"string","description":"The date and time when the status was set (Y-m-d H:i:s)."}}}}},"CatalogProduct":{"type":"object","properties":{"sku":{"type":"string"},"digital":{"type":"boolean"},"price_ranged":{"type":"boolean"},"price":{"type":["number","null"],"format":"float","description":"Present when `price_ranged` is `false`."},"price_min":{"type":["number","null"],"format":"float","description":"Present when `price_ranged` is `true`."},"price_max":{"type":["number","null"],"format":"float","description":"Present when `price_ranged` is `true`."},"category":{"type":"object","properties":{"unique_id":{"type":"string"},"name":{"type":"array","items":{"type":"object","properties":{"locale":{"type":"string"}}}}}},"brand":{"type":"object","properties":{"unique_id":{"type":"string"},"name":{"type":"array","items":{"type":"object","properties":{"locale":{"type":"string"}}}}}},"images":{"type":"array","items":{"type":"object","properties":{"locale":{"type":"string"}}}},"name":{"type":"array","items":{"type":"object","properties":{"locale":{"type":"string"}}}},"description":{"type":"array","items":{"type":"object","properties":{"locale":{"type":"string"}}}},"terms":{"type":"array","items":{"type":"object","properties":{"locale":{"type":"string"}}}},"instructions":{"type":"array","items":{"type":"object","properties":{"locale":{"type":"string"}}}},"inventory":{"type":"integer"},"tax_exempt":{"type":"boolean"}}},"BatchParticipant":{"type":"object","properties":{"organization":{"type":"string"},"program":{"type":"string"},"collection":{"type":"array","items":{"$ref":"#/components/schemas/UserWrite"}}}},"BatchAdjustmentCollectionItem":{"type":"object","properties":{"participant":{"type":"string","description":"Participant ID"}},"allOf":[{"$ref":"#/components/schemas/PointWrite"}]},"BatchAdjustment":{"type":"object","properties":{"organization":{"type":"string"},"program":{"type":"string"},"collection":{"type":"array","items":{"$ref":"#/components/schemas/BatchAdjustmentCollectionItem"}}}},"BatchTransactionCollectionItem":{"type":"object","properties":{"participant":{"type":"string","description":"Participant ID"}},"allOf":[{"$ref":"#/components/schemas/CreateTransaction"}]},"BatchTransaction":{"type":"object","properties":{"organization":{"type":"string"},"program":{"type":"string"},"collection":{"type":"array","items":{"$ref":"#/components/schemas/BatchTransactionCollectionItem"}}}},"MilestoneCreate":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"The name of the milestone"},"completed_email":{"type":"string","description":"Email message to send when milestone is reached."},"reward_adjustment":{"type":"number","format":"float","description":"Points to award when milestone is completed"}}},"MilestoneRead":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"The unique identifier of the milestone"},"name":{"type":"string","description":"The name of the milestone"},"completed_email":{"type":"string","description":"Email message to send when milestone is completed"},"reward_adjustment":{"type":"number","format":"float","description":"Points to award when milestone is completed"},"active":{"type":"boolean","description":"Whether the milestone is active"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"activities":{"type":"array","items":{"$ref":"#/components/schemas/ActivityRead"}}}},"MilestoneUpdate":{"type":"object","properties":{"name":{"type":"string","description":"The name of the milestone"},"completed_email":{"type":"string","description":"Email message to send when milestone is completed"},"reward_adjustment":{"type":"number","format":"float","description":"Points to award when milestone is completed"},"active":{"type":"boolean","description":"Whether the milestone is active"}}},"ActivityCreate":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"The name of the activity"}}},"ActivityRead":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"The unique identifier of the activity"},"name":{"type":"string","description":"The name of the activity"},"milestone_uuid":{"type":"string","format":"uuid","description":"The unique identifier of the parent milestone"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"ActivityUpdate":{"type":"object","properties":{"name":{"type":"string","description":"The name of the activity"}}},"ParticipantProgress":{"type":"object","properties":{"participant_unique_id":{"type":"string","description":"The unique identifier of the participant"},"progress_percentage":{"type":"number","format":"float","description":"Completion percentage for the milestone"},"progress_data":{"type":"object","description":"Detailed progress information","properties":{"activities":{"type":"object","additionalProperties":{"type":"object","properties":{"completed":{"type":"boolean"},"completed_at":{"type":"string","format":"date-time"}}}}}}}},"ParticipantProgressDetail":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"The unique identifier of the progress record"},"participant_unique_id":{"type":"string","description":"The unique identifier of the participant"},"milestone_uuid":{"type":"string","format":"uuid","description":"The unique identifier of the milestone"},"progress_percentage":{"type":"number","format":"float","description":"Completion percentage for the milestone"},"progress_data":{"type":"object","description":"Detailed progress information","properties":{"activities":{"type":"object","additionalProperties":{"type":"object","properties":{"completed":{"type":"boolean"},"completed_at":{"type":"string","format":"date-time"}}}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"BulkUpsertResponse":{"type":"object","properties":{"successes":{"type":"array","items":{"type":"string"},"description":"Array of participant IDs that were successfully processed"},"failures":{"type":"array","items":{"type":"object","properties":{"participant_id":{"type":"string"},"error":{"type":"string"}}},"description":"Array of participant IDs that failed with error messages"}}},"ActivityCompletionUpdate":{"type":"object","required":["completed"],"properties":{"completed":{"type":"boolean","description":"Whether the activity is completed"}}},"ActivityCompletionResponse":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"The unique identifier of the progress record"},"participant_unique_id":{"type":"string","description":"The unique identifier of the participant"},"activity_uuid":{"type":"string","format":"uuid","description":"The unique identifier of the activity"},"completed":{"type":"boolean","description":"Whether the activity is completed"},"completed_at":{"type":"string","format":"date-time","description":"When the activity was completed"},"progress_percentage":{"type":"number","format":"float","description":"Updated completion percentage for the milestone"}}},"ServiceAward":{"type":"object","description":"A service award configured for a program.","properties":{"id":{"type":"string","format":"uuid"},"program_uuid":{"type":"string","format":"uuid"},"name":{"type":"string","description":"Display name of the service award."},"reward_type":{"type":"integer","description":"1 = points, 2 = product SKU.","enum":[1,2]},"reward_value":{"type":"string","description":"The reward amount. For points this is the number of points to issue. For SKU this is the product SKU to fulfill."},"is_trigger_yearly":{"type":"boolean","description":"When true the award triggers every year on the participant's milestone date. When false it triggers once at the configured interval."},"interval":{"type":["integer","null"],"description":"Number of days between award triggers. Required when is_trigger_yearly is false."},"issuance_time":{"type":["string","null"],"description":"Time of day to issue the award (HH:mm, 24-hour format).","example":"09:00"},"timezone":{"type":["string","null"],"description":"Timezone for the issuance time (e.g. America/New_York)."},"active":{"type":"integer","description":"1 is true 0 is false"},"issuance_email_enabled":{"type":"integer","description":"1 is true 0 is false. When enabled, participants receive an email when they are enrolled in the award."},"issuance_email_template":{"type":"string","description":"HTML email template sent when a participant is enrolled."},"fulfillment_email_template":{"type":["string","null"],"description":"HTML email template sent when a reward is fulfilled."},"sent_from":{"type":["string","null"],"description":"Email address used as the sender for award notifications."},"issuance_subject":{"type":["string","null"],"description":"Subject line for issuance notification emails."},"fulfillment_subject":{"type":["string","null"],"description":"Subject line for fulfillment notification emails."},"created_at":{"type":"string","description":"Datetime the award was created."},"updated_at":{"type":"string","description":"Datetime the award was last updated."}}},"ServiceAwardCreate":{"type":"object","required":["name","reward_type","reward_value","is_trigger_yearly","active"],"properties":{"name":{"type":"string","description":"Display name of the service award."},"reward_type":{"type":"integer","description":"1 = points, 2 = product SKU.","enum":[1,2]},"reward_value":{"type":"string","description":"The reward amount. For points this is the number of points to issue. For SKU this is the product SKU to fulfill."},"is_trigger_yearly":{"type":"boolean","description":"When true the award triggers every year on the participant's milestone date. When false it triggers once at the configured interval."},"interval":{"type":"integer","description":"Number of days between award triggers. Required when is_trigger_yearly is false."},"active":{"type":"integer","description":"1 is true 0 is false","enum":[0,1]},"issuance_time":{"type":"string","description":"Time of day to issue the award (HH:mm, 24-hour format).","example":"09:00"},"timezone":{"type":"string","description":"Timezone for the issuance time (e.g. America/New_York)."},"issuance_email_enabled":{"type":"integer","description":"1 is true 0 is false. Defaults to enabled.","default":1},"issuance_email_template":{"type":"string","description":"HTML email template sent when a participant is enrolled."},"fulfillment_email_template":{"type":"string","description":"HTML email template sent when a reward is fulfilled."},"sent_from":{"type":"string","format":"email","description":"Email address used as the sender for award notifications."},"issuance_subject":{"type":"string","description":"Subject line for issuance notification emails."},"fulfillment_subject":{"type":"string","description":"Subject line for fulfillment notification emails."}}},"ServiceAwardUpdate":{"type":"object","description":"All fields are optional. Only include the fields you wish to change. Awards that have completed fulfillments cannot be modified.","properties":{"name":{"type":"string"},"reward_type":{"type":"integer","enum":[1,2]},"reward_value":{"type":"string"},"is_trigger_yearly":{"type":"boolean"},"interval":{"type":"integer"},"active":{"type":"integer","enum":[0,1]},"issuance_time":{"type":"string","example":"09:00"},"timezone":{"type":"string"},"issuance_email_enabled":{"type":"integer"},"issuance_email_template":{"type":"string"},"fulfillment_email_template":{"type":"string"},"sent_from":{"type":"string","format":"email"},"issuance_subject":{"type":"string"},"fulfillment_subject":{"type":"string"}}},"ServiceAwardParticipant":{"type":"object","description":"A participant enrolled in a service award.","properties":{"id":{"type":"string","format":"uuid"},"participant_id":{"type":"string","format":"uuid","description":"The unique identifier of the participant."},"service_award_id":{"type":"string","format":"uuid"},"date":{"type":"string","format":"date","description":"The participant's milestone date (e.g. hire date). YYYY-MM-DD."},"created_at":{"type":"string"},"updated_at":{"type":"string"},"fulfillments":{"type":"array","description":"History of reward fulfillments for this participant.","items":{"$ref":"#/components/schemas/ServiceAwardFulfillment"}},"most_recent_reward_date":{"type":["string","null"],"format":"date","description":"Date of the most recent fulfilled reward."},"next_reward_date":{"type":["string","null"],"format":"date","description":"Projected date of the next reward."}}},"ServiceAwardFulfillment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"date":{"type":"string","format":"date"},"processed_at":{"type":["string","null"],"description":"Datetime the fulfillment was processed."},"reward":{"type":"string","description":"The reward type label (POINTS or SKU).","enum":["POINTS","SKU"]},"reward_value":{"type":"string"},"reward_status":{"type":"string","description":"Current status of the fulfillment.","enum":["pending","processed","failed"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"ServiceAwardParticipantWrite":{"type":"object","required":["participant_id","date"],"properties":{"participant_id":{"type":"string","description":"The unique identifier of the participant to enroll."},"date":{"type":"string","format":"date","description":"The participant's milestone date (e.g. hire date) in YYYY-MM-DD format. This date is used to calculate when rewards should be issued."}}},"ServiceAwardBulkResponse":{"type":"object","description":"Summary of a bulk participant enrollment operation.","properties":{"status":{"type":"string","description":"Overall status of the operation.","example":"completed"},"summary":{"type":"object","properties":{"total_participants":{"type":"integer","description":"Total number of participants in the request."},"successful":{"type":"integer","description":"Number of participants successfully enrolled."},"failed":{"type":"integer","description":"Number of participants that failed validation."}}},"errors":{"type":"array","description":"Details about failed enrollments. Empty when all succeed.","items":{"type":"object","properties":{"participant_id":{"type":"string"},"error_type":{"type":"string","description":"Category of the error.","enum":["validation_error","email_processing_error"]},"error_message":{"type":"string"}}}}}}}}}