post
https://sandcaas.undostres.com.mx/debit/v1/customer-program/assign-customer
Assigns one or more customers to an existing customer program.
If a customer is already assigned, the assignment will be updated.
Important considerations
- program_code is required and must exist in the database.
- The program must be active—customers cannot be assigned to inactive programs.
- customer_ids array cannot be empty.
- Non-existent customer IDs are automatically filtered out; only valid customers are assigned.
- If all provided customer IDs are invalid, the operation fails.
- For customers already assigned to the program, their old assignment is deactivated and a new one is created.
- The response distinguishes between newly assigned customers and updated assignments.
- Supports bulk assignment, multiple customers can be assigned in a single request.
- All operations are atomic, if any step fails, no assignments are made.
- Customer existence is validated before assignment to prevent orphaned records.