How to connect with CatKissFish via API?
2024-06-24 09:36:39
2376

Thank you for your interest and support of CatKissFish. We sincerely hope that you can realize your life's dream through print-on-demand.CatKissFish will continue to provide you with high quality and fast supply chain services.

First,Apply for developer account

The application for the development account of the docking platform has been approved, and the official personnel of Cat Kiss Fish provide client_id and client_secret. Equivalent to accessing the API authentication account and password of the Cat Kiss Fish platform.

Response Status Code:

Status CodeMessage
10000The user does not have permission to request access to the open API.
10001Platform order ID duplicated, please check.
10002The internal design on the site does not exist.
10003The external design on the site does not exist.
10004The SKU in the order does not exist.
10005An order cannot simultaneously contain offline products and official website products.
10006Country abbreviation is invalid, please check.
10007Province cannot be purely numeric, please check.
10008City cannot be purely numeric, please check.

Second,oauth

1. Get access_token

The platform adopts the Auth 2.0 authorization process to obtain tokens, and each Access Token obtained has timeliness. Developers need to pay attention to its preservation and timeliness check to ensure the normal use of the application. Each token is valid for 2 hours, and if it expires, it needs to be retrieved again.
Request URL: https://www.catkissfish.com:8443/oauth2/client_token
Request Method: POST
Request parameters:

nametyperequiredesc
grant_typestringtrueDefault:client_credentials
client_idstringtrueget client_id from the Cat Kiss Fish platform
client_secretstringtrueget client_secret from the Cat Kiss Fish platform

Response:

{
    "code": 200,
    "msg": "ok",
    "data": {
        "client_token": "z82le16xOcvPsMoT6GjiddPWSfsU2k4FtPMNaTlkSUcLG3FMiv68ucmWzlzF",
        "expires_in": 7200,
        "client_id": "NODRZVQA"
    }
}

1. Create Order

Request URL: https://www.catkissfish.com:8443/open/api/order/v1/createOrder
Request Method: POST
Request Header:
Content-Type: application/json;charset=utf-8
access_token: Your token

Request parameters:


{
    "shopOrderId": "2024032207",
    "designInfos": [
        {
            "sku": "AF",  #sku prefix
            "quantity": 2, #must be number
            "color":"GREEN",
            "size":"XXXL",
            "customSku":"KH2D032802",  //customer sku
            "effectImageUrls":["https://upload.qiucl.cn/LFE3CV_XXL_XXL_0.jpg"], #mockup image link
            "originImageUrls":["https://cdn.pixabay.com/photo/2023/10/16/01/40/aviation-8318208_640.jpg"], #image materials link
            "finishedImageUrls":[]
        },
        {
            "sku": "2DQZYCPT032801",
            "quantity": 2,
            "color":"Yellow",
            "size":"s",
            "customSku":"KH2D032801",
            "effectImageUrls":["https://cdn.pixabay.com/photo/2023/10/16/01/40/aviation-8318208_640.jpg"],
            "originImageUrls":["https://cdn.pixabay.com/photo/2024/02/16/19/22/green-parrot-8578205_640.jpg"],
            "finishedImageUrls":["https://upload.qiucl.cn/LFE3CV_XXL_XXL_0.jpg"]
        }
    ],
    "shippingAddress": {
        "countryCode": "86",
        "userName": "Kevin",
        "countryAbbreviation": "CN",
        "province": "32Y",
        "city": "3S43",
        "postalCode": " 334110",
        "email": "66@QQ.COM",
        "phone": "6512",
        "detailAddress": " Street R"
    }
}

Response

{
    "code": 0,
    "message": "Order created successfully",
    "data": {
        "amount": "25.00",
        "payAmount": "25.00",
        "shopOrderId": "20243032207",
        "stateName": "Unpaid",
        "discountAmount": "0.00",
        "currency": "USD",
        "id": "2024040816062180735923",
        "state": 1
    }
}

2. Query order tracking number

Request URL: https://www.catkissfish.com:8443/open/api/order/v1/queryOrderTrackingNumber/{id}
Request Method: GET
Request Header:
access_token: Your token
Response:

{
    "code": 0,
    "message": "Query Success",
    "data": [
        {
            "id": "d032c7454e9e439082f431836c2155b4",
            "orderId": "2024022908593058781115",
            "logisticName": "DHL",
            "logisticKey": "190422",
            "logisticNumber": "91562466275221",  #tracking number
            "register": 0,
            "createDate": "2024-02-29 09:33:19",
            "createBy": 0,
            "updateBy": 0
        }
    ]
}

1. Query Product List

Request URL: https://www.catkissfish.com:8443/open/api/externalProduct/v1/list
Request Method: GET
Request Header:
access_token: Your token
Response:


{
    "code": 0,
    "message": "Query Success",
    "data": [
        {
            "skuPrefix": "STX",
            "material": "100% cotton",
            "stateName": "Approved",
            "price": 12.50,
            "customerProductName": "Round neck pure cotton short sleeved T-shirt",
            "styleSku": "",
            "lineId": "1000",
            "lineName": "3D",
            "currency": "USD",
            "id": "1770691891519348737",
            "state": 2,
            "createDate": "2024-03-21 14:00:19"
        },
        {
            "material": "100% cotton",
            "stateName": "Pending review",
            "price": 19.90,
            "customerProductName": "",
            "lineId": "1000",
            "lineName": "3D",
            "currency": "USD",
            "id": "1763750409239584769",
            "state": 1,
            "createDate": "2024-03-02 10:17:21"
        }
    ]
}

2. Query Product Size List

Request URL: https://www.catkissfish.com:8443/open/api/externalProduct/v1/size/{id}
Request Method: GET
Request Header:
access_token: Your token
Response:



{
    "code": 0,
    "message": "Query Success",
    "data": [
        "S",
        "M",
        "L",
        "XL",
        "2XL",
        "3XL",
        "4XL",
        "5XL"
    ]
}

3. Query Product Color List

Request URL: https://www.catkissfish.com:8443/open/api/externalProduct/v1/colors/{id}
Request Method: GET
Request Header:
access_token: Your token
Response:



{
    "code": 0,
    "message": "Query Success",
    "data": [
        "RED",
        "BLACK",
        "GRAY"
    ]
}


print on demand
$240 OFF
For New
Work Orders
Help center