Archived field logic doens't make sense.

maurisourcemaurisource Partner Posts: 26 partner

From the API Docs, endpoints such as 'Customers' support "archived" field which is a (boolean) type.

However, by default this field always returns "false" matching records in GET Response.

Records matching "true" is never returned by the GET Response.


Scenario to reproduce: From my account, I delete CustomerID: 12

Current API response:

       {
           "firstName": "Customer",
           "lastName": "Eleven",
           "dob": "2001-05-20T07:00:00+00:00",
           "title": "EAT A W...it's so satisfying ",
           "company": "Employee",
           "companyRegistrationNumber": "",
           "vatNumber": "",
           "creditAccountID": "25",
           "customerTypeID": "3",
           "discountID": "0",
           "taxCategoryID": "0",
           "customerID": "11",
           "createTime": "2019-04-23T22:44:15+00:00",
           "timeStamp": "2019-05-28T23:29:52+00:00",
           "archived": "false"
       },


Expected API response:

       {
           "firstName": "Customer",
           "lastName": "Eleven",
           "dob": "2001-05-20T07:00:00+00:00",
           "title": "EAT A W...it's so satisfying ",
           "company": "Employee",
           "companyRegistrationNumber": "",
           "vatNumber": "",
           "creditAccountID": "25",
           "customerTypeID": "3",
           "discountID": "0",
           "taxCategoryID": "0",
           "customerID": "11",
           "createTime": "2019-04-23T22:44:15+00:00",
           "timeStamp": "2019-05-28T23:29:52+00:00",
           "archived": "false"
       },
       {
           "firstName": "Customer",
           "lastName": "Twelve",
           "dob": "2019-04-25T07:00:00+00:00",
           "title": "Bass player",
           "company": "",
           "companyRegistrationNumber": "",
           "vatNumber": "",
           "creditAccountID": "47",
           "customerTypeID": "0",
           "discountID": "0",
           "taxCategoryID": "0",
           "customerID": "12",
           "createTime": "2019-04-24T17:18:31+00:00",
           "timeStamp": "2019-05-20T22:11:28+00:00",
           "archived": "true"
       },


As you can see customerID:12 is inexistant from the GET Response.

As a result it's impossible to pull records that are in "archived" state


Can the someone explain the logic behind that or confirm if it's a BUG ?

4 comments

Sign In or Register to comment.