Skip to main content
Answer

REST API: retrieving a CustomerPaymentMethod

  • May 9, 2024
  • 2 replies
  • 189 views

Forum|alt.badge.img+2

Does anyone know how to retrieve data in a CustomerPaymentMethod using a CustomerID, PaymentMethod name, Card Account Number, and Value using the REST API in Postman?

 

Here’s what I have so far in my GET method:

https://sandbox.com/entity/Default/22.200.001/CustomerPaymentMethod/Customer/C10010473712

 

I’m not sure what all the parameters are supposed to be so I just get an error using that:

{

    "message": "An error has occurred.",

    "exceptionMessage": "No entity satisfies the condition.",

    "exceptionType": "PX.Api.ContractBased.NoEntitySatisfiesTheConditionException",

Best answer by jinin

Hi @bpgraves ,

You can try adding a filter condition.

Example:

/entity/Default/20.200.001/CustomerPaymentMethod/?$filter=CustomerID eq 'ACTIVESTAF' and CardAccountNbr eq 'Fedwire'
 

 

2 replies

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • Answer
  • May 10, 2024

Hi @bpgraves ,

You can try adding a filter condition.

Example:

/entity/Default/20.200.001/CustomerPaymentMethod/?$filter=CustomerID eq 'ACTIVESTAF' and CardAccountNbr eq 'Fedwire'
 

 


Forum|alt.badge.img+2
  • Author
  • Semi-Pro I
  • May 10, 2024

Hi @bpgraves ,

You can try adding a filter condition.

Example:

/entity/Default/20.200.001/CustomerPaymentMethod/?$filter=CustomerID eq 'ACTIVESTAF' and CardAccountNbr eq 'Fedwire'
 

Thank you!  That worked great!  😀