moov-io/customers

New endpoint for batch searching for customers and accounts.

jmbrown412 opened this issue · 6 comments

We need to query customers service to get a subset of the customers and accounts using the account id as a search param.

POST /customers-reports/customers-by-account [ , , ...] => [ { account: {...}, customer: {...} }, { account: {...}, customer: {...} }, { account: {...}, customer: {...} } ... ]

vxio commented

I'm planning on:
Creating an endpoint: /customers/accounts?accountIDs={id_1, id_2,...} that should make a single SQL query
which should return a response:

[
   { 
      "customer": {...},
      "account": {...},
    },
   ...
]

Let me know if I'm missing anything or if you'd prefer a different approach.

I like having "reports" somewhere in the URL. This is generating that type of response object.

@joshsadler does this look okay? IIRC Jordan and Josh worked out that previous response body.

vxio commented

@adamdecaf good point

How about /reports/customers/accounts?

That's fine. Keep in mind the frontend doesn't plan to ever call this endpoint directly, it's more service to service.

vxio commented

@adamdecaf good point

How about /reports/customers/accounts?

On second thought, /reports/accounts would be better.