![]() |
爱玩的小笼包 · Swift读取RSA Key报错RSA ...· 3 天前 · |
![]() |
腼腆的烈马 · JAVA获取本周 本月 本年 ...· 2 天前 · |
![]() |
豪情万千的单车 · 第 8 部分:使用 Ajax 汇报 ...· 昨天 · |
![]() |
单身的皮带 · PHP实现图片base64编码与解码_php ...· 16 小时前 · |
![]() |
细心的手电筒 · 通过图片处理持久化快速访问处理后的图片_对象 ...· 16 小时前 · |
![]() |
气势凌人的西装 · 志高多媒体投影机-志高多媒体投影机促销价格、 ...· 3 月前 · |
![]() |
玉树临风的硬币 · 使用 TiDB Lightning 从 ...· 5 月前 · |
![]() |
重感情的红酒 · 创建简单的跑酷游戏源代码-百度开发者中心· 8 月前 · |
![]() |
灰常酷的柳树 · [Solved] ...· 9 月前 · |
![]() |
爱搭讪的饼干 · 第676章麦苗_终宋TXT下载百度网盘_怪诞 ...· 9 月前 · |
Access keys consist of an access key ID and secret access key.
To access G2G OpenAPI, you will need to request from G2G.
When your request to access G2G OpenAPI is approved, you can create access keys from G2G OpenAPI management page. You authenticate with our API by providing the appropriate key in the request Authorization header. Never share your secret keys. Keep them guarded and secure.
Authentication is handled via HTTP headers, as shown in the table below:
Param Descritpion g2g-api-key String Your access key ID created in G2G.
c09222e3fc40ffb25fc947f738b1abf1
g2g-userid
String
Your G2G user ID.
509205
g2g-signature
String
Signature generated by API path, api_key, user_id and timestamp via HMAC-SHA256 hashing algorithm.
e318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2
g2g-timestamp
timestamp
This is to indicate the timestamp of the request, in miliseconds. Required for all requests. Expires in 5 minutes.
1654675838694
Top Up only supported in V2
Order Delivery Flow is mainly for Top Up order.
Understand delivery attributes for Top Up
Buyer has to fill in Order Information when place order.
When you call Get Attributes API,
delivery_method_list
will be returned in the response.
Under
delivery_method_list
, lookup
attribute_group_list
.
From the Order Information sample image, you will get below response:
"attribute_group_list"
:
[
"attribute_group_id"
:
"e02308e5"
,
"attribute_group_name"
:
"User ID"
,
"input_field"
:
"text"
,
"input_settings"
:
{
}
,
"is_required"
:
true
,
"attribute_key"
:
"delivery_info_1"
,
"attribute_list"
:
[
]
"attribute_group_id"
:
"1759fb6c"
,
"attribute_group_name"
:
"Servers (Ragnarok X: Next Generation)"
,
"input_field"
:
"dropdown"
,
"input_settings"
:
{
"is_searchable"
:
false
"is_required"
:
true
,
"attribute_key"
:
"delivery_info_2"
,
"attribute_list"
:
[
"attribute_id"
:
"98f0250f"
,
"attribute_name"
:
"Aldebaran"
,
"sub_attribute_list"
:
[
]
"attribute_id"
:
"6ab853d2"
,
"attribute_name"
:
"Angeling"
,
"sub_attribute_list"
:
[
]
.
.
.
// more options
The 1st attribute is a
text
field, which is refers to
User ID
input and the
attribute_key
is
delivery_info_1
.
The 2nd attribute is a
dropdown
field, which is refers to
Server
input and the
attribute_key
is
delivery_info_2
.
You are adviced to use
attribute_key
for integration instead of
attribute_group_id
or
attribute_group_name
.
When order is placed, you will receive webhook
order.api_delivery
and
delivery_method_list
will be provided in the payload.
"delivery_method_list"
:
[
"attribute_group_id"
:
"e02308e5"
,
"attribute_group_name"
:
"User ID"
,
"attribute_key"
:
"delivery_info_1"
,
"attribute_id"
:
""
,
"attribute_value"
:
""
,
"value"
:
"hello_world"
"attribute_group_id"
:
"1759fb6c"
,
"attribute_group_name"
:
"Servers (Ragnarok X: Next Generation)"
,
"attribute_key"
:
"delivery_info_2"
,
"attribute_id"
:
"98f0250f"
,
"attribute_value"
:
"Aldebaran"
,
"value"
:
""
From the sample payload above,
delivery_info_1
refers to
User ID
and
hello_world
is the User ID provided by buyer.
delivery_info_2
refers to
Servers
and
Aldebaran
is the server chosen by buyer.
The following code snippet is a sample error response that contains an error code and message pair:
"code"
:
40400001
,
"message"
:
"The requested resource does not exist."
,
"warning"
:
""
,
"request_id"
:
"595285dc-9c43-4b9c-a1e6-0cd9aff5b084"
,
"payload"
:
{
}
When troubleshooting the error, you can divide the error code into two components: REST API HTTP status code and error category code. See the following error code sample:
404
00001
404 - HTTP status code
404
00001 - G2G OpenAPI error code
The following table summarizes the HTTP response codes you may receive from the G2GOpen API.
Status Code
Description
Everything worked as expected.
The request was unacceptable, often due to missing a required parameter, incorrect data type or incorrect request schema.
No valid API key provided. For eg:
-
API key mismatch with user_id
-
The status of the API key is denied
The API key doesn't have permissions to perform the request.
The requested resource doesn't exist.
The request conflicts with another request.
Unprocessable Entity.
The request cannot be completed because client have exceeded his rate limits.
Something went wrong on G2GOpenAPI’s end, these are rare.
Descritpion | 40000001 | The request was unacceptable, often due to missing a required parameter. | 40100001 | The request is not authorized and cannot access the requested resource. | 40300001 | The application identified with the request is not available. | 40400001 | The requested resource does not exist. | 40900001 | The requested resource already exists. | 40900002 | Data constraint violation. | 42200001 | Validation error. | 42900001 | Throttle request. | 50000001 | The server encounters an unexpected exception while trying to process the request. Please retry the request. |
---|
Please visit
https://github.com/g2g-official/open-api-sample
to download the sample postman collection as a reference to kickstart your API integration.
Version | Descritpion | Deprecated. We encourage to use the latest version of G2G OpenAPI. | Current version of G2G OpenAPI. |
---|
language |
string
Default:
"en"
Enum
:
"en"
"zh-CN"
"id"
"zh-TW"
Language |
Get Brands
path
Parameters
service_id
required
|
string
<
uuid
>
Example:
44b3148a-0dc8-4262-81d8-c762559f0d74
The unique identifier of a service. Note : This API have a limit of 1000 results per request |
query
Parameters
language |
string
Default:
"en"
Enum
:
"en"
"zh-CN"
"id"
"zh-TW"
Language |
q |
string
Example:
q=itunes
Search brands by keyword. |
after |
string
<
uuid
>
Example:
after=ba683457-f9d0-4330-bea7-923ed300d2e5
Retrieve next set of brands. |
Get Products
query
Parameters
category_id |
string
<
uuid
>
Example:
category_id=f6fc99db-96d2-4158-a29f-663d9a2f6199
The unique identifier of a category. |
service_id |
string
<
uuid
>
Example:
service_id=44b3148a-0dc8-4262-81d8-c762559f0d74
The unique identifier of a service. Required when category_id is not provided |
brand_id |
string
<
uuid
>
Example:
brand_id=8c42b2d4-6d2c-4188-931a-240d2f94183f
The unique identifier of a brand. Required when service_id is provided |
q |
string
Example:
q=itunes
Search products by brand keyword. |
Get Attributes
path
Parameters
product_id
required
|
string
<
uuid
>
Example:
4a610301-4e3a-4cc7-b242-35ebc1a521a7
The unique identifier of a product. |
}
]
,
}
]
}
}
Create Offer
Request Body schema:
application/json
product_id
required
string
<
uuid
>
The unique identifier of the product.
title
string
The title of an offer. Not applicable for Giftcard & Top Up
description
string
Description of an offer. Not applicable for Giftcard
min_qty
required
integer
>= 1
Minimum purchase quantity.
api_qty
required
int
>= 0
The quantity of stock to sell in G2G via OpenAPI.
low_stock_alert_qty
required
int
>= 0
When reach low_stock_alert_qty, will receive offer.low_stock webhook
required
Array of
objects
[ items
]
currency
required
string
Currency ISO code.
Reference
unit_price
required
number
<
double
>
> 0
Unit price of an offer item.
Array of
objects
[ 1 .. 3 ] items
[ items
]
Array of
objects
[ items
]
Other currency pricing that you may have for an offer.
Array of
objects
[ items
]
The wholesale detail setting for other currency that you may have for an offer.
object
Setting to allow or disallowed buyer from specific country to purchase the offer. Default global, no country restriction
delivery_method_ids
Array of
strings
<
uuid
>
A list of uid string that respresent delivery method of an offer. Does not required for Gift Card offer
}
Update Offer
path
Parameters
offer_id
required
string
Example:
G1650341633714BW
The unique identifier of an offer.
Request Body schema:
application/json
min_qty
integer
>= 1
Minimum purchase quantity.
api_qty
int
>= 0
The quantity of stock to sell in G2G via OpenAPI.
low_stock_alert_qty
int
>= 0
When reach low_stock_alert_qty, will receive offer.low_stock webhook
Array of
objects
[ items
]
currency
string
Currency ISO code.
Reference
unit_price
number
<
double
>
> 0
Unit price of an offer item.
Array of
objects
[ 1 .. 3 ] items
[ items
]
Array of
objects
[ items
]
Other currency pricing that you may have for an offer.
Array of
objects
[ items
]
The wholesale detail setting for other currency that you may have for an offer.
object
Setting to allow or disallowed buyer from specific country to purchase the offer. Default global, no country restriction
delivery_method_ids
Array of
strings
<
uuid
>
A list of uid string that respresent delivery method of an offer. Does not required for Gift Card offer
}
Delete Offer
path
Parameters
offer_id
required
string
Example:
G1650341633714BW
The unique identifier of an offer.
Search Offers
Request Body schema:
application/json
object
The search and filter query settings.
page_size
integer
[ 1 .. 100 ]
Specify the number of offers to return per page. Default:
20
page
integer
>= 1
Return a result of a page.
Get Deliveries
path
Parameters
order_id
required
string
Example:
1654240349966TEKP-1
The unique identifier of an order.
query
Parameters
after
string
Example:
after=Item#1670568841157TEST-1#D1671691755000
Retrieve next set of result.
}
Deliver Code
path
Parameters
order_id
required
string
Example:
1654240349966TEKP-1
The unique identifier of an order.
Request Body schema:
application/json
delivery_id
required
string
The unique identifier of a delivery operation that was provided in order.api_delivery webhook.
required
Array of
objects
[ 1 .. 100 ] items
[ items
]
Array of codes to be sent to buyer based on specific order_id
Get Delivery Status
path
Parameters
order_id
required
string
Example:
1654240349966TEKP-1
The unique identifier of an order.
delivery_id
required
string
Example:
D1650341633714
The unique identifier of delivery.
Response samples
Patch Delivery
path
Parameters
order_id
required
string
Example:
1654240349966TEKP-1
The unique identifier of an order.
delivery_id
required
string
Example:
D1650341633714
The unique identifier of delivery.
Request Body schema:
application/json
delivered_qty
required
integer
Total quantity of item delivered by seller for this order.
delivery_issue
string
Enum
:
"incorrect_delivery_detail"
"insufficient_stock"
"others"
Issue encountered when unable to fulfill the requested deliver quantity.
delivered_at
required
integer
Timestamp in milliseconds when the code is delivered for this delivery.
reference_id
string
A reference identifier for this delivery.
Upload Code
Request Body schema:
application/json
content
required
string
A digital code for the offer. You can get the code format from Get Offer API.
content_type
required
string
Value
:
"text/plain"
The content value type.
reference_id
required
string
A reference identifier for the code.
View Code Info
path
Parameters
offer_id
required
string
Example:
G1650341633714BW
The unique identifier of an offer.
item_id
required
string
<
uuid
>
Example:
3430aa12-6e5e-4d22-ab75-8af4d44b2914
The unique identifier of an inventory items.
Delete Code
path
Parameters
offer_id
required
string
Example:
G1650341633714BW
The unique identifier of an offer.
item_id
required
string
<
uuid
>
Example:
3430aa12-6e5e-4d22-ab75-8af4d44b2914
The unique identifier of an inventory items.
Search Webhook Logs
Request Body schema:
application/json
required
object
The search and filter query settings.
limit
integer
Specifies the number of messages to return per page.
sort_order
string
Enum
:
"asc"
"desc"
The ordering of the records.
after
string
Marks the starting point of the search results to retrieve in the result set.
Response samples
"response_time"
:
0
,
"event_sent_at"
:
1659695016249
}
,
"id"
:
"59d6b795-0e87-4788-b793-6b2b94838c4d-1"
,
"event_happened_at"
:
1659695025419
}
,
"response_time"
:
1
,
"event_sent_at"
:
1659695027366
}
]
,
"after"
:
"1659695025419"
}
}
Get Services
query
Parameters
language
string
Default:
"en"
Enum
:
"en"
"zh-CN"
"id"
"zh-TW"
Language
Get Brands
path
Parameters
service_id
required
string
<
uuid
>
Example:
44b3148a-0dc8-4262-81d8-c762559f0d74
The unique identifier of a service.
Note
: This API have a limit of 1000 results per request
query
Parameters
language
string
Default:
"en"
Enum
:
"en"
"zh-CN"
"id"
"zh-TW"
Language
q
string
Example:
q=itunes
Search brands by keyword.
after
string
<
uuid
>
Example:
after=ba683457-f9d0-4330-bea7-923ed300d2e5
Retrieve next set of brands.
Get Products
query
Parameters
service_id
required
string
<
uuid
>
Example:
service_id=44b3148a-0dc8-4262-81d8-c762559f0d74
The unique identifier of a service.
brand_id
required
string
<
uuid
>
Example:
brand_id=8c42b2d4-6d2c-4188-931a-240d2f94183f
The unique identifier of a brand.
Get Attributes
path
Parameters
product_id
required
string
<
uuid
>
Example:
4a610301-4e3a-4cc7-b242-35ebc1a521a7
The unique identifier of a product.
}
Create Offer
Request Body schema:
application/json
product_id
required
string
<
uuid
>
The unique identifier of the product.
min_qty
required
integer
>= 1
Minimum purchase quantity.
api_qty
required
int
>= 0
The quantity of stock to sell in G2G via OpenAPI.
low_stock_alert_qty
required
int
>= 0
When reach low_stock_alert_qty, will receive offer.low_stock webhook
required
Array of
objects
[ items
]
currency
required
string
Currency ISO code.
Reference
unit_price
required
number
<
double
>
> 0
Unit price of an offer item.
Array of
objects
[ 1 .. 3 ] items
[ items
]
object
Setting to allow or disallowed buyer from specific country to purchase the offer. Default global, no country restriction
Get Offer
path
Parameters
offer_id
required
string
Example:
G1650341633714BW
The unique identifier of an offer.
Update Offer
path
Parameters
offer_id
required
string
Example:
G1650341633714BW
The unique identifier of an offer.
Request Body schema:
application/json
min_qty
integer
>= 1
Minimum purchase quantity.
api_qty
int
>= 0
The quantity of stock to sell in G2G via OpenAPI.
low_stock_alert_qty
int
>= 0
When reach low_stock_alert_qty, will receive offer.low_stock webhook
Array of
objects
[ items
]
currency
string
Currency ISO code.
Reference
unit_price
number
<
double
>
> 0
Unit price of an offer item.
Array of
objects
[ 1 .. 3 ] items
[ items
]
object
Setting to allow or disallowed buyer from specific country to purchase the offer. Default global, no country restriction
Delete Offer
path
Parameters
offer_id
required
string
Example:
G1650341633714BW
The unique identifier of an offer.
Deliver Code
path
Parameters
order_id
required
string
Example:
1654240349966TEKP-1
The unique identifier of an order.
Request Body schema:
application/json
delivery_id
required
string
The unique identifier of a delivery operation that was provided in order.api_delivery webhook.
required
Array of
objects
[ 1 .. 100 ] items
[ items
]
Array of codes to be sent to buyer based on specific order_id
Get Delivery Status
path
Parameters
order_id
required
string
Example:
1654240349966TEKP-1
The unique identifier of an order.
delivery_id
required
string
Example:
D1650341633714
The unique identifier of delivery.
Response samples
Upload Code
Request Body schema:
application/json
content
required
string
A digital code for the offer. You can get the code format from Get Offer API.
content_type
required
string
Value
:
"text/plain"
The content value type.
reference_id
required
string
A reference identifier for the code.
View Code Info
path
Parameters
offer_id
required
string
Example:
G1650341633714BW
The unique identifier of an offer.
item_id
required
string
<
uuid
>
Example:
3430aa12-6e5e-4d22-ab75-8af4d44b2914
The unique identifier of an inventory items.
Delete Code
path
Parameters
offer_id
required
string
Example:
G1650341633714BW
The unique identifier of an offer.
item_id
required
string
<
uuid
>
Example:
3430aa12-6e5e-4d22-ab75-8af4d44b2914
The unique identifier of an inventory items.
Search Webhook Logs
Request Body schema:
application/json
required
object
The search and filter query settings.
limit
integer
Specifies the number of messages to return per page.
sort_order
string
Enum
:
"asc"
"desc"
The ordering of the records.
after
string
Marks the starting point of the search results to retrieve in the result set.
Response samples
"response_time"
:
0
,
"event_sent_at"
:
1659695016249
}
,
"id"
:
"59d6b795-0e87-4788-b793-6b2b94838c4d-1"
,
"event_happened_at"
:
1659695025419
}
,
"response_time"
:
1
,
"event_sent_at"
:
1659695027366
}
]
,
"after"
:
"1659695025419"
}
}
-
-
On top right of the menu bar, click on your avatar, select API Integration.
Developer contact
G2G will send an alert email to this contact when your system does not respond upon receiving the webhook message.
Callback URL
G2G will send the webhook message to this URL. The secret token is mandatory. G2G will use it to create a hash signature that is passed along in the g2g-signature. You can generate secret token on your own or use the "Generate random secret token" provided by G2G. Please copy the secret key and keep it securely.
Events
You must fill in the callback URL before configuring webhook events. G2G will send webhook message to your system for the events you selected. By selecting all events, all existing events and any future incoming events will also be selected.
Event Header
Whenever webhook was triggered by an event, a signature will be embeded in the header.
Header
Description
g2g-signature
String
Signature generated by webhook URL, api_key, user_id and timestamp via HMAC-SHA256 hashing algorithm.
Example:
e318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2
g2g-timestamp
String
The timestamp in milliseconds when G2G send the message to you.
Example:
1654576148000
Verifying Signature
Python
import hashlib, hmac
webhook_secret_token = "gBW1wXgBNnA" # Your Webhook Secret Token
user_id = "100000" # Your User ID
timestamp = "1653278884000" # g2g-timestamp
webhook_url = "https://www.your_webhook_url.com"
canonical_string = webhook_url + user_id + str(timestamp);
signature = hmac.new(
key=bytes(webhook_secret_token.encode("utf8")),
msg=bytes(canonical_string.encode("utf8")),
digestmod=hashlib.sha256,
).hexdigest()
print(signature) # This value should match with g2g-signature, which is 645343db00f974f5dab1f9e9ed8d4846a265e150291009fe40bfbdf437cfa16a
Orders
The webhooks for different stage of orders
Event
Trigger
order.created
Buyer placed the order but not yet paid.
order.confirmed
Buyer has made the payment and payment is confirmed.
order.delivery_status
The result of your delivery request, it could be fully delivered / partial delivered / unfulfilled
Note
: If you are not subscribed to this event, you can use
Get Delivery Status API
to check your delivery status.
order.api_delivery
Seller is ready to deliver codes via API.
Note
: Seller should start prepare deliver the codes when receive this event. Please refer to
Deliver Code API
to deliver codes
order.cancelled
The payment of the order is unsuccessful and cancelled.
order.completed
Buyer has confirmed order received.
order.rollback_cancelled
A cancelled order is moved back to unpaid.
order.rollback_completed
Buyer reported issue after confirmed receipt.
order.case_opened
Buyer reported an issue of the order.
Note
: Seller should investigate the reported case from
G2G resolution center
when receive this event.
Offers
The webhooks for offer
Event
Trigger
offer.low_stock
Seller's offer is below the low stock threshold.
order.created
Webhook
header
Parameters
g2g-signature
string
The signed signature for webhook payload verification
g2g-timestamp
string
The timestamp when post the webhook
Request Body schema:
application/json
id
string
The event ID of the request.
event_happened_at
integer
Timestamp in milliseconds when the event occured.
event_type
string
Value
:
"order.created"
The type of the webhook event.
object
Request payload.
order.confirmed
Webhook
header
Parameters
g2g-signature
string
The signed signature for webhook payload verification
g2g-timestamp
string
The timestamp when post the webhook
Request Body schema:
application/json
id
string
The event ID of the request.
event_happened_at
integer
Timestamp in milliseconds when the event occured.
event_type
string
Value
:
"order.confirmed"
The type of the webhook event.
object
Request payload.
order.delivery_status
Webhook
header
Parameters
g2g-signature
string
The signed signature for webhook payload verification
g2g-timestamp
string
The timestamp when post the webhook
Request Body schema:
application/json
id
string
The event ID of the request.
event_happened_at
integer
Timestamp in milliseconds when the event occured.
event_type
string
Value
:
"order.delivery_status"
The type of the webhook event.
object
Request payload.
Responses
Request samples
-
Payload
Content type
application/json
Example
Delivered
Delivered
Partial Delivered
Unfulfilled
}
}
order.api_delivery
Webhook
header
Parameters
g2g-signature
string
The signed signature for webhook payload verification
g2g-timestamp
string
The timestamp when post the webhook
Request Body schema:
application/json
id
string
The event ID of the request.
event_happened_at
integer
Timestamp in milliseconds when the event occured.
event_type
string
Value
:
"order.api_delivery"
The type of the webhook event.
object
Request payload.
Responses
Request samples
-
Payload
Content type
application/json
Example
Top Up
Top Up
Gift Card
]
,
"case_id"
:
""
,
"delivery_id"
:
"D1671693034000"
,
"delivery_method_code"
:
"direct_top_up"
,
"delivery_method_list"
:
]
,
"delivery_mode"
:
"normal"
,
"expired_at"
:
0
,
"requested_at"
:
1671693034000
,
"requested_qty"
:
1
}
}
}
order.cancelled
Webhook
header
Parameters
g2g-signature
string
The signed signature for webhook payload verification
g2g-timestamp
string
The timestamp when post the webhook
Request Body schema:
application/json
id
string
The event ID of the request.
event_happened_at
integer
Timestamp in milliseconds when the event occured.
event_type
string
Value
:
"order.cancelled"
The type of the webhook event.
object
Request payload.
order.refunded
Webhook
header
Parameters
g2g-signature
string
The signed signature for webhook payload verification
g2g-timestamp
string
The timestamp when post the webhook
Request Body schema:
application/json
id
string
The event ID of the request.
event_happened_at
integer
Timestamp in milliseconds when the event occured.
event_type
string
Value
:
"order.refunded"
The type of the webhook event.
object
Request payload.
order.completed
Webhook
header
Parameters
g2g-signature
string
The signed signature for webhook payload verification
g2g-timestamp
string
The timestamp when post the webhook
Request Body schema:
application/json
id
string
The event ID of the request.
event_happened_at
integer
Timestamp in milliseconds when the event occured.
event_type
string
Value
:
"order.completed"
The type of the webhook event.
object
Request payload.
order.rollback_cancelled
Webhook
header
Parameters
g2g-signature
string
The signed signature for webhook payload verification
g2g-timestamp
string
The timestamp when post the webhook
Request Body schema:
application/json
id
string
The event ID of the request.
event_happened_at
integer
Timestamp in milliseconds when the event occured.
event_type
string
Value
:
"order.rollback_cancelled"
The type of the webhook event.
object
Request payload.
order.rollback_completed
Webhook
header
Parameters
g2g-signature
string
The signed signature for webhook payload verification
g2g-timestamp
string
The timestamp when post the webhook
Request Body schema:
application/json
id
string
The event ID of the request.
event_happened_at
integer
Timestamp in milliseconds when the event occured.
event_type
string
Value
:
"order.rollback_completed"
The type of the webhook event.
object
Request payload.
order.case_opened
Webhook
header
Parameters
g2g-signature
string
The signed signature for webhook payload verification
g2g-timestamp
string
The timestamp when post the webhook
Request Body schema:
application/json
id
string
The event ID of the request.
event_happened_at
integer
Timestamp in milliseconds when the event occured.
event_type
string
Value
:
"order.case_opened"
The type of the webhook event.
object
Request payload.
Responses
Request samples
-
Payload
Content type
application/json
}
offer.low_stock
Webhook
header
Parameters
g2g-signature
string
The signed signature for webhook payload verification
g2g-timestamp
string
The timestamp when post the webhook
Request Body schema:
application/json
id
string
The event ID of the request.
event_happened_at
integer
Timestamp in milliseconds when the event occured.
event_type
string
Value
:
"offer.low_stock"
The type of the webhook event.
object
Request payload.
-
Product
-
Get products by categories.
-
In OpenAPI V2, obtaining product information has become easier by providing the category ID obtained from the
Get Service
API.
-
Introduce Top Up products and its delivery methods.
-
The
Get Attributes
V2 API will now show the available delivery methods for Top Up products.
-
Support multiple currencies for
Create
&
Update
Offer.
-
Unit prices in different currencies are supported by adding
other_pricing
.
-
Wholesale prices in different currencies can be added in
other_wholesale_details
.
-
Support retrieving multiple delivery information based on an order.
-
Introduce a new API to update delivery status of Top Up orders.
-
The
Patch Delivery
API allows users to inform the G2G system that the requested item has been delivered to the buyer.
The required action of the migration consists in:
Updating all request URIs to use the V2 URI endpoint.
Update the parameters and request bodies.
Update the response parsing.
"message"
:
""
,
"warning"
:
""
,
"request_id"
:
"595285dc-9c43-4b9c-a1e6-0cd9aff5b084"
,
"payload"
:
{
"service_list"
:
[
"service_id"
:
"44b3148a-0dc8-4262-81d8-c762559f0d74"
,
"service_name"
:
"Gift Cards"
,
"delivery_method"
:
"instant_code_delivery"
"message"
:
""
,
"warning"
:
""
,
"request_id"
:
"595285dc-9c43-4b9c-a1e6-0cd9aff5b084"
,
"payload"
:
{
"service_list"
:
[
"service_id"
:
"44b3148a-0dc8-4262-81d8-c762559f0d74"
,
"service_name"
:
"Gift Cards"
,
"categories"
:
[
"category_name"
:
"Gift Cards"
,
"category_id"
:
"f6fc99db-96d2-4158-a29f-663d9a2f6199"
"category_name"
:
"Video Games"
,
"sub_categories"
:
[
"category_name"
:
"PC Platform"
,
"category_id"
:
"2994a61d-3993-44ba-8190-e3daac599278"
"category_name"
:
"PSN (Playstation) Platform"
,
"category_id"
:
"96364cef-838f-49c0-9efb-0fa90dfa06d2"
"category_name"
:
"Xbox Platform"
,
"category_id"
:
"148255f6-4ab4-4af4-833d-4deedb4fd574"
"category_name"
:
"Nintendo Switch Platform"
,
"category_id"
:
"dc67a04b-3aa1-460c-aaa3-549ebecb3404"
Feature
Introduce G2G OpenApi V2. please refer to
V2 Breaking Changes
Improved
order.created
webhook to support other_pricing info
Feature
Added
order.refunded
event webhook that will be send to seller each time seller's order being refunded. To ensure deliverability please make sure
order.refunded
webhook is selected in
API Integration