Logo PopinaPopina API

Get customers list

Get or search in the list of customers

GET/v1/customers/
authorization<token>

Use device JWT token

In: header

Query Parameters

type?string
Value in"person" | "company"
searchText?string
index?integer

Index of the page query parameter

Default0
Range0 <= value
size?integer

Number of record on a page query parameter (capped to 100)

Default10
Range1 <= value <= 100
since?string

Start date for date range (first day included). Accepts a date in the format ISO 8601 : YYYY-MM-DD

until?string

End date for date range (last day included). Accepts a date in the format ISO 8601 : YYYY-MM-DD

sorting?

Response Body

application/json

application/json

application/json

curl -X GET "http://localhost:4012/v1/customers/"
{
  "data": [
    {
      "id": "9f8e7d6c-5b4a-4c2d-8e0f-9a8b7c6d5e4f",
      "type": "person",
      "name": "Jensen Daniel",
      "email": "Lera_Huels77@yahoo.com",
      "phoneNumber": "1-629-884-3787 x11713",
      "comment": "Lorem ipsum dolor sit",
      "createdAt": "2023-10-01T12:00:00.000Z",
      "updatedAt": "2023-10-01T12:00:00.000Z"
    },
    {
      "id": "a1b2c3d4-5e6f-4a8b-9c0d-1e2f3a4b5c6d",
      "type": "company",
      "name": "Globex Corporation",
      "email": "info@globex.com",
      "phoneNumber": "+1 (555) 123-4567",
      "comment": "Innovative solutions for a better tomorrow",
      "createdAt": "2023-09-15T09:30:00.000Z",
      "updatedAt": "2023-09-20T14:20:00.000Z"
    },
    {
      "id": "b2c3d4e5-6f7a-4b9c-8d1e-2f3a4b5c6d7e",
      "type": "person",
      "name": "Jamie Blick",
      "email": "Alia.Bosco@gmail.com",
      "phoneNumber": "(742) 244-2542 x96046",
      "createdAt": "2023-10-01T11:00:00.000Z",
      "updatedAt": "2023-10-01T16:00:00.000Z"
    },
    {
      "id": "c3d4e5f6-7a8b-4c0d-8e2f-3a4b5c6d7e8f",
      "type": "person",
      "name": "Julien Langworth",
      "email": "Eugene_Christiansen@hotmail.com",
      "phoneNumber": "(536) 685-6638",
      "comment": "This is a comment",
      "createdAt": "2023-09-01T11:00:00.000Z",
      "updatedAt": "2023-09-01T16:00:00.000Z"
    },
    {
      "id": "d4e5f6a7-8b9c-4d1e-8f3a-4b5c6d7e8f9a",
      "type": "company",
      "name": "Acme Corp",
      "email": "info@acme-corp.com",
      "phoneNumber": "+33 1 23 45 67 89",
      "comment": "Leading provider of road runner deterrents",
      "createdAt": "2023-08-15T10:30:00.000Z",
      "updatedAt": "2023-08-20T14:45:00.000Z"
    }
  ],
  "meta": {
    "totalPage": 260,
    "totalCount": 1300,
    "currentPageIndex": 0,
    "pageSize": 5,
    "hiddenByFilterCount": 200
  },
  "links": {
    "self": "http://localhost/v1/customers?size=5",
    "first": "http://localhost/v1/customers?size=5&index=0",
    "last": "http://localhost/v1/customers?size=5&index=598",
    "next": "http://localhost/v1/customers?size=5&index=1",
    "prev": null
  }
}
{
  "message": "string",
  "code": "INSUFFICIENT_BALANCE",
  "meta": {
    "property1": null,
    "property2": null
  }
}
{
  "message": "string",
  "code": "INSUFFICIENT_BALANCE",
  "meta": {
    "property1": null,
    "property2": null
  }
}