Skip to main content

Fetch all gift cards

Details

Used to fetch paginated giftcards.

URL : <base_url>/giftcards/all

Method : GET

Authentication required : YES

Request parameters

In the request URL, provide the following parameters or query string with values.

ParameterTypeExampleDescription
pageinteger1Used for pagination.

Success Response

Code : 200 OK

Content :

{
"current_page": 1,
"data": [
{
"id": 1,
"current_code": "PMLBO",
"item": "Item 1",
"created_at": "2021-02-18T18:43:17.000000Z",
"updated_at": "2021-06-17T23:55:04.000000Z",
"active": true,
"expires": null,
"value": 1000,
"balance": 800
},
{
"id": 2,
"current_code": "XULII",
"item": "Item 1",
"created_at": "2021-02-18T18:43:17.000000Z",
"updated_at": "2021-03-05T18:03:45.000000Z",
"active": true,
"expires": null,
"value": 1000,
"balance": 1000
},
{
"id": 3,
"current_code": "IRZDH",
"item": "Item 1",
"created_at": "2021-02-18T18:43:17.000000Z",
"updated_at": "2021-03-05T18:03:45.000000Z",
"active": true,
"expires": null,
"value": 1000,
"balance": 1000
},
{
"id": 4,
"current_code": "CDQRJ",
"item": "Item 1",
"created_at": "2021-02-18T18:43:17.000000Z",
"updated_at": "2021-03-05T18:03:45.000000Z",
"active": true,
"expires": null,
"value": 1000,
"balance": 1000
},
{
"id": 5,
"current_code": "RQTYQ",
"item": "Item 1",
"created_at": "2021-02-18T18:44:51.000000Z",
"updated_at": "2021-03-05T18:03:45.000000Z",
"active": true,
"expires": null,
"value": 1000,
"balance": 1000
}
],
"first_page_url": "http://merchant.giftme.test/team/api/v1/giftcards/all?page=1",
"from": 1,
"last_page": 54,
"last_page_url": "http://merchant.giftme.test/team/api/v1/giftcards/all?page=54",
"links": [
{
"url": null,
"label": "&laquo; Previous",
"active": false
},
{
"url": "http://merchant.giftme.test/team/api/v1/giftcards/all?page=2",
"label": "Next &raquo;",
"active": false
}
],
"next_page_url": "http://merchant.giftme.test/team/api/v1/giftcards/all?page=2",
"path": "http://merchant.giftme.test/team/api/v1/giftcards/all",
"per_page": 5,
"prev_page_url": null,
"to": 5,
"total": 268
}