Get Collection List

This API is to get a list of collections.

For server-side pagination, please use the query options to navigate.

Authentication

LeanX uses Auth Token to authenticate in each request's header.

Auth Token can be retrieved in your portal dashboard under API page.

Request Header

{
    "auth-token": "LP-0D7C06DE-MM|7394e58e-edee-4c42-9ca5-bcbc449f1b9f|2141df4a3cb633d5ce8683bb0c55067e5caebfbe07390dde277dc455bcc95c91723a81b5e565c7c02d68fb84e396722563016bf99e576a4b8cdbe4423fbf226b"
}

Get Collection List

HTTP Method: POST

https://api.leanx.dev/api/v1/merchant/collection-list

Request Query

?skip=0&limit=10

Query

Query
Type
Description

skip*

Number

Start row

limit*

Number

Amount of row per page

Request Body

{
  "start_date": "01-01-1970",
  "end_date": "31-12-2050",
  "record_status": 1,
  "search": {
    "search_enable": false,
    "search_key": "TEST COLLECTION",
    "search_column": "title"
  },
  "sort": {
    "sort_type": "desc",
    "parameter_name": "created_at"
  }
}

Attributes

Property
Type
Description

start_date*

String

Start date in DD-MM-YYYY format

end_date*

String

End date in DD-MM-YYYY format

record_status*

Number

1 = ACTIVE

search.search_enable*

Boolean

To enable searches

search.search_key

String

Search value. Required if search.search_enable is true

search.search_column

String

A collection property. Required if search.search_enable is true

sort.sort_type

String

asc or desc

sort.parameter_name

String

One of collection property. Eg: created_at

Response

{
  "response_code": 2000,
  "description": "SUCCESS",
  "app_version": "/api/v1",
  "talk_to_server_before": "2023-01-25T11:31:35.413432",
  "data": {
    "list": {
      "draw": 1,
      "record_total": 1,
      "record_filtered": 1,
      "data": [
        {
          "title": "Public API Collection Creation",
          "record_status": 1,
          "uuid": "CL-AUTH-ADA0B0240E-LNP",
          "created_at": "2023-01-25T11:14:40",
          "description": "This is public API collection description",
          "updated_at": "2023-01-25T10:58:04",
          "enable_billing_address": true,
          "min_amount": 160,
          "id": 15,
          "fixed_amount": true,
        }
      ],
      "next_page_start": 10,
      "next_page_length": 10,
      "previous_page_start": "",
      "previous_page_length": 10
    }
  },
  "breakdown_errors": "",
  "token": "dbd44a99-2d0f-470d-91fe-c73e8cdd1848"
}

Last updated