Sharable Cash

Attach Customer Profile to a Program

To attach a Customer’s Profile to a Program, follow the next steps:

1. Get the list of available Programs and copy the id  of the one you need:

GET /programs

//Sample Response

{
  "paging": {
    "page_size": 50,
    "page_number": 1,
    "total_count": 1,
    "last_evaluated_key": null
  },
  "data": [
    {
      "program_id": "prm_gffshiRdalN7Iabc",
      "program_name": "CashConnect",
      "program_description": "CashConnect sharing program.",
      "program_display_name": "CashConnect",
      "created_by": "SYSTEM",
      "created_date_time": "2023-03-02T16:09:00",
      "modified_by": "SYSTEM",
      "modified_date_time": "2023-03-02T16:09:00"
    }
    
      ],
  "errors": null
}   

2. Attach a Customer Profile to the Program

You need to know a customer_profile_id to attach a Customer Profile to the Program. If you don't know your id, use GET /customer-profiles to find the Profile you need and copy a customer_profile_id.

POST /programs/{program_id}/customer-profiles

//Sample Request

{
  "customer_profile_id": "csp_0M7rasYLB7LylY1x",
  "customer_profile_program_status_reason": "Attaching a Customer to the Program due to the request #4528"
}

//Sample response

{
  "paging": null,
  "data": [
    {
      "id": "csp_0M7rasYLB7LylY1x"
    }
  ],
  "errors": null
}

3. To verify all Customer Profiles attached to a particular Program, use the following request:

GET /programs/{program_id}/customer-profiles

//Sample response

{
  "paging": {
    "page_size": 50,
    "page_number": 1,
    "total_count": 2,
    "last_evaluated_key": null
  },
  "data": [
    {
      "customer_profile_id": "csp_cfrZxa1j6lYStYMh",
      "program_id": "prm_gffshiRdalN7Ixyo",
      "customer_profile_program_status_id": 10,
      "customer_profile_program_status_reason": "Updated by the Customer Profile Attach lambda",
      "created_by": "510E7392ED8E4149",
      "created_datetime": "2023-04-21T10:21:29.49",
      "modified_by": "510E7392ED8E4149",
      "modified_datetime": "2023-04-21T10:21:29.49",
      "is_locked": false
    }
  ],
  "errors": null
}

It may take several minutes for a Customer Profile to attach. You can monitor it using the GET methods on our API.

4.  To verify the status of the Customer Profile Program Configuration, you may use the following request:

GET /programs/{program_id}/customer-profiles/{customer_profile_id}

//Sample response

{
  "paging": null,
  "data": [
    {
      "customer_profile_id": "csp_cfrZxa1j6lYStYMh",
      "program_id": "prm_gffshiRdalN7Ixyo",
      "customer_profile_program_status_id": 10,
      "customer_profile_program_status_reason": "Updated by the Customer Profile Attach lambda",
      "created_by": "510E7392ED8E4149",
      "created_datetime": "2023-04-21T10:21:29.49",
      "modified_by": "510E7392ED8E4149",
      "modified_datetime": "2023-04-21T10:21:29.49",
      "is_locked": false
    }
  ],
  "errors": null
}