HomeGuidesAPI ReferenceChangelogDiscussions
HomeLog In
Guides

Function

To get detailed information of gifts.
撈取贈品的詳細資訊

URL

GET <<api_domain>>/v1/gifts

Response Fields

FieldColumn TypeDescriptionExample
idStringGift ID
贈品ID
5b3d860559d52419850001bc
statusStringGift's Status
贈品狀態

- Status allows:
_active上架

_draft 下架
active
title_translationsTranslationTitle Translations
贈品名稱
"en": "gift",
"zh-hant": "贈品"
skuStringStock Keeping Unit
贈品貨號
gift_a
quantityNumberCurrent Quantity
贈品目前庫存
20
costMoneyCost of Gift
贈品成本
NT$20
weightFloatWeight of Gift (kg)
贈品重量 (公斤重)
1
mediasMediaMedia Data
媒體(照片)資訊
updated_atDateTimeUpdated Time
贈品更新時間
2018-07-05T02:44:59.596+00:00
created_atDateTimeCreated Time
贈品創造時間
2018-07-05T02:44:21.073+00:00
unlimited_quantityBooleanWhether the quantity is unlimited
庫存是否無限
false
paginationPaginationPagination Data
頁面資訊
Please check the link on the left

Response Example

{
    "items": [
        {
            "id": "5b3d860559d52419850001bc",
            "status": "active",
            "title_translations": {
                "en": "gift",
                "zh-hant": "贈品"
            },
            "sku": "gift_a",
            "quantity": 20,
            "cost": {
                "cents": 20,
                "currency_symbol": "NT$",
                "currency_iso": "TWD",
                "label": "NT$20",
                "dollars": 20
            },
            "weight": 1,
            "medias": [
                {
                    "images": {
                        "original": {
                            "width": 400,
                            "height": 400,
                            "url": "https://img.shoplineapp.com/media/image_clips/5b3d85f64e22a6b4ff004f72/original.png?1530758644"
                        },
                        "landscape": {
                            "width": 400,
                            "height": 400,
                            "url": "https://img.shoplineapp.com/media/image_clips/5b3d85f64e22a6b4ff004f72/original.png?1530758644"
                        },
                        "source": {
                            "width": 400,
                            "height": 400,
                            "url": "https://img.shoplineapp.com/media/image_clips/5b3d85f64e22a6b4ff004f72/source.png?1530758644"
                        },
                        "thumb": {
                            "width": 200,
                            "height": 200,
                            "url": "https://img.shoplineapp.com/media/image_clips/5b3d85f64e22a6b4ff004f72/thumb.png?1530758644"
                        },
                        "medium": {
                            "width": 250,
                            "height": 250,
                            "url": "https://img.shoplineapp.com/media/image_clips/5b3d85f64e22a6b4ff004f72/medium.png?1530758644"
                        },
                        "large": {
                            "width": 400,
                            "height": 400,
                            "url": "https://img.shoplineapp.com/media/image_clips/5b3d85f64e22a6b4ff004f72/large.png?1530758644"
                        },
                        "xlarge": {
                            "width": 400,
                            "height": 400,
                            "url": "https://img.shoplineapp.com/media/image_clips/5b3d85f64e22a6b4ff004f72/xlarge.png?1530758644"
                        },
                        "favicon_small": {
                            "width": 400,
                            "height": 400,
                            "url": "https://img.shoplineapp.com/media/image_clips/5b3d85f64e22a6b4ff004f72/original.png?1530758644"
                        },
                        "favicon": {
                            "width": 400,
                            "height": 400,
                            "url": "https://img.shoplineapp.com/media/image_clips/5b3d85f64e22a6b4ff004f72/original.png?1530758644"
                        },
                        "favicon_large": {
                            "width": 400,
                            "height": 400,
                            "url": "https://img.shoplineapp.com/media/image_clips/5b3d85f64e22a6b4ff004f72/original.png?1530758644"
                        },
                        "transparent_thumb": {
                            "width": 400,
                            "height": 400,
                            "url": "https://img.shoplineapp.com/media/image_clips/5b3d85f64e22a6b4ff004f72/original.png?1530758644"
                        },
                        "transparent_medium": {
                            "width": 400,
                            "height": 400,
                            "url": "https://img.shoplineapp.com/media/image_clips/5b3d85f64e22a6b4ff004f72/original.png?1530758644"
                        },
                        "transparent_large": {
                            "width": 400,
                            "height": 400,
                            "url": "https://img.shoplineapp.com/media/image_clips/5b3d85f64e22a6b4ff004f72/original.png?1530758644"
                        },
                        "transparent_xlarge": {
                            "width": 400,
                            "height": 400,
                            "url": "https://img.shoplineapp.com/media/image_clips/5b3d85f64e22a6b4ff004f72/original.png?1530758644"
                        }
                    },
                    "_id": "5b3d85f64e22a6b4ff004f72",
                    "alt_translations": {}
                }
            ],
            "updated_at": "2018-07-05T02:44:59.596+00:00",
            "created_at": "2018-07-05T02:44:21.073+00:00",
            "unlimited_quantity": false,
        }
    ],
    "pagination": {
        "current_page": 1,
        "per_page": 50,
        "total_pages": 1,
        "total_count": 1
    }
}

Sample Request

curl --location --request GET '<<api_domain>>/v1/gifts?per_page=50&page=1' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ${token}'