Skip to content

Web Hooks

This is for Web Hooks management.

Note

Ginee Open API enable you to receive notifications whenever particular changes are made to Ginee. You can subscribe to notifications for a wide variety of events, including:

  • Master Product: This push is triggered when there is a new master product, or when a master product is updated or deleted.
  • Order: Each order status update, starting from new order placement to all the subsequent order status, will trigger this push.
  • Fulfillment Order: This push is triggered whenever a sell outbound order is created/updated.
  • Inbound Order: This push is triggered when there is a new inbound order, or when an inbound order is updated, or when an entry order is cancelled.
  • Outbound Order: This push is triggered when there is a new outbound order, an updated outbound order, or a cancelled outbound order.

Get Started

Step 1. Provide a endpoint URL for receiving notifications(One endpoint per module)

The URL of your server endpoint that will receive all webhook notifications.

Note

Please contact Ginee staff and provide the informations above.

Step 2. Receiving webhooks

When a webhook event that you’ve subscribed to occurs, Ginee Open API sends a POST request to your server endpoint with the details of the event.

Webhook notification requests have same data structure, for example:

Example

curl -X POST  \
-H "Content-Type: application/json" \
-d '{
    "id":"GENIE654311C44CEABD00018A98BC",
    "entity":"master_product_create",
    "action":"CREATE",
    "createAt":"2023-11-02T03:04:36.565154Z",
    "payload":{
        "masterProductId":"SO612311C44CEDFD0001D75C0C"
    }
}'
curl -X POST  \
-H "Content-Type: application/json" \
-d '{
    "id":"GENIE654311C44CEABD00018A98BC",
    "entity":"order",
    "action":"CREATE",
    "createAt":"2023-11-02T03:04:36.565154Z",
    "payload":{
        "orderId":"SO612311C44CEDFD0001D75C0C",
        "channel":"SHOPEE_ID",
        "shopId":"SH64AAV776CFF47E0001044403",
        "externalShopId":"",
        "orderStatus":"PENDING_PAYMENT",
        "createAt":"2023-11-02T03:04:35Z",
        "payAt":null,
        "lastUpdateAt":null,
        "deleteAt":null
    }
}'
curl -X POST  \
-H "Content-Type: application/json" \
-d '{
    "id":"GENIE654311C44CEABD00018A98BC",
    "entity":"fulfillment_order",
    "action":"CREATE",
    "createAt":"2023-11-02T03:04:36.565154Z",
    "payload":{
        "outboundOrderNo":"So-1770402724937080832",
        "basic": {
            "gineeOrderId":"SO612311C44CEDFD0001D75C0C",
            "channelOrderNo":"234dsfds4534",
            "channel":SHOPEE_ID
            "shopId":"SH64AAV776CFF47E0001044403",
            "gineeWarehouseId":"WW6405BFCDEE35880001821D6F",
            "country":"ID",
            "currency":"IDR",
            "orderTime":"2024-08-13T08:47:10Z",
            "totalAmount":"123.01",
            "codAmount":null,
            "faceSheetPdfPath":"https://genie-biz-prod.oss-ap-southeast-1.aliyuncs.com/awb/SHOPEE_ID/SO66BB1D9130C49E0001B951EE_SL_PL_OFG177236563231001.pdf?Expires=1724834843&OSSAccessKeyId=LTAI4FoovV31HDemVv1o1zTa&Signature=npk4vubNbgEeu5Semhe9ZIFUrQY%3D",
            "firstMileName":"",
            "lastMileName":"",
            "trackingNumber":"342sdfs233432",
            "logisticsProviderName":"Anteraja Reguler",
            "buyerRemark":"",
            "sellerRemark":"",
            "itemTotalWeight":"",
        },
        "orderItems":{
            "itemSku":"T0001",
            "itemName":"red-apple",
            "quantity":1
        },
        "receiver":{
            "addr":"****",
            "area":"****",
            "city":"****",
            "province":"****",
            "country":"****",
            "postCode":"****",
            "name":"****",
            "phone":"****",
        },
        "sender":{
            "addr": null,
            "area":null,
            "city": null,
            "province": null,
            "country": null,
            "postCode": null,
            "name": null,
            "phone": null,
        }
    }
}'
curl -X POST  \
-H "Content-Type: application/json" \
-d '{
    "id": "GENIE65FAC062DC0E8200010CFF8C",
    "entity": "inbound_create",
    "action": "CREATE",
    "createAt": "2024-03-20T10:54:26.774580Z",
    "payload": {
        "id": 8062,
        "userId": "U5DDCC5369BD1160001ADD698",
        "no": "Adj-1770392889365504000",
        "warehouseId": "WW6405BFCDEE35880001821D6F",
        "status": "PENDING",
        "planAmount": 33,
        "realAmount": 0,
        "remark": "12",
        "deliveryMethod": "DEFAULT",
        "waybillNumber": "",
        "createDatetime": "2024-03-20T10:12:11.855Z",
        "updateDatetime": "2024-03-20T10:12:42.482Z",
        "planQuantity": 1,
        "realQuantity": 0,
        "items": [
            {
                "id": 7911,
                "status": "PENDING",
                "masterVariationId": "MV64481C3CE21B84000129256A",
                "masterSku": "BLPD-002KNG1222",
                "planQuantity": 1,
                "realQuantity": 0,
                "planPrice": 33,
                "realPrice": 0,
                "planAmount": 33,
                "realAmount": 0,
                "remark": "",
                "failReason": ""
            }
        ]
    }
}'
curl -X POST  \
-H "Content-Type: application/json" \
-d '{
    "id": "GENIE65FABFC6DC0E8200010CFF86",
    "entity": "outbount_create",
    "action": "CREATE",
    "createAt": "2024-03-20T10:51:50.662125Z",
    "payload": {
        "id": 192876,
        "no": "So-1770402724937080832",
        "outboundOrderType": "MANUALLY_OUT",
        "warehouseId": "WW62D8C1C836D1A0000183E379",
        "warehouseName": "dsf2",
        "status": "PENDING",
        "planAmount": 1000,
        "realAmount": 1000,
        "planQuantity": 1,
        "realQuantity": 1,
        "orderId": "SO65FABFA1FA4F8C0001661D63",
        "externalOrderSn": "mq20240320005",
        "items": [
            {
                "orderItemId": "OI65FABFA1FA4F8C0001661D66",
                "availableStock": 243,
                "warehouseStock": 246,
                "status": "PENDING",
                "masterVariationId": "MV65F898849B9717000180B2B4",
                "warehouseInventoryId": "WI65FAB14E6B2F070001692684",
                "shelfInventoryId": "SI65FAB14E6B2F070001692685",
                "masterSku": "TESTING SYNC BUTTON 1",
                "masterVariationName": "TESTING SYNC BUTTON 1",
                "planQuantity": 1,
                "realQuantity": 1,
                "outQuantity": 0,
                "planAmount": 1000,
                "realAmount": 1000,
                "planPrice": 1000,
                "realPrice": 1000
            }
        ]
    }
}'

You should always respond with a 200 status code to indicate that you received the notification.

200 OK

Request Parameters

Parameter Description
id string(required) Unique id for each notification
entity string(required) Entity value
action string(required) Event type (CREATE, UPDATE, DELETE)
createAt UTC timestamp(optional) Timestamp that a notification created
payload object(required) Payload message, see details below

Payload Messages

master product

Parameter Type Description
masterProductId string Master Product Id in Ginee

order

Parameter Description
orderId string Order id in Ginee
channel string Please refer to Ginee Channel for details
shopId string Shop id in Ginee
externalShopId string Channel shop id
orderStatus string Order status
createAt UTC timestamp Order create time
payAt UTC timestamp Order pay time
lastUpdateAt UTC timestamp Order update time

inbound order

Parameter Type Description
id long Purchase order id in Ginee

outbound order

Parameter Type Description
id long outbound order id in Ginee