+1 (855) 920-2583
Login

[REST API] Error when trying to filter orders by Customer

Modified on: Fri, 17 Nov 2023 1:14 PM
Original Publishing Date:
2023-10-17

Symptoms


The Order Management REST API documentation contains instructions on filtering orders based on CustomerID. It mentions to use the function 'type' with property 'customerID'. However, when trying to get the list of filtered orders, the request fails with the error seen below:



Request: 


https://example.com/aps/2/services/order-manager/orders?in(type,CF),in(customerID,d1bfb390-d8a4-40e5-8aed-c6354231ab9c)
Null

Response:

"error": "com.ingrammicro.billing.aps.exception.APSError",    "packageId": "60d481af-eaa9-4f71-9135-436810e3f2c8",     "message": "com.ingrammicro.billing.application.exceptions.RQLMappingNotExist: Mapping from RQL property 'customerId' doesn't exist.",
Null


Cause


The documentation of Order Management API incorrectly states to use the property 'customerID' to filter the orders.


The RQL property 'customerID' does not exist.


Resolution


Use the property 'buyerID' or 'buyerInternalID' instead. 


https://example.com/aps/2/services/order-manager/orders?in(buyerInternalId,1001091),in(type,CH)
Null


https://example.com/aps/2/services/order-manager/orders?in(buyerId,d1bfb390-d8a4-40e5-8aed-c6354231ab9c),in(type,CH) 
Null


A documentation bug #DOC-3362 has been raised to fix this.