Hooks
This module enables integration of other plataforms with the key API
Create a new order on the key API standards
post
Authorizations
Path parameters
companyIdstringRequired
Body
externalOrderIdstringOptionalExample:
XPTO-0001
verificationTypestring · enumOptionalDefault:
invisible
Possible values: Responses
201Success
401
Unauthorized - Integration API key or JWT required
post
POST /integration/ecommerce/hooks/{companyId}/new-order HTTP/1.1
Host:
x-w3block-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 185
{
"user": {
"email": "john.green@w3block.io",
"name": "John"
},
"products": [
{
"externalId": "XPTO-0001-43",
"description": "Lorem..."
}
],
"externalOrderId": "XPTO-0001",
"verificationType": "invisible"
}
No content
Create a new order on woo commerce standards
post
Path parameters
companyIdstringRequired
Header parameters
x-wc-webhook-signaturestringOptional
Webhook signature
Body
order_keystringRequiredExample:
wc_order_602aevefa
statusstringRequired
Responses
201Success
post
POST /integration/ecommerce/hooks/{companyId}/woo-commerce HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 158
{
"billing": {
"first_name": "John",
"email": "john.dee@w3block.io"
},
"order_key": "wc_order_602aevefa",
"line_items": [
{
"sku": "NFTXPTO",
"quantity": 1
}
],
"status": "text"
}
201Success
No content
Get status from created order
get
Authorizations
Path parameters
companyIdstringRequired
externalOrderIdstringRequired
Responses
200Success
application/json
401
Unauthorized - Integration API key or JWT required
get
GET /integration/ecommerce/hooks/{companyId}/external-order-id/{externalOrderId} HTTP/1.1
Host:
x-w3block-api-key: YOUR_API_KEY
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"externalOrderId": "XPTO-0001",
"products": [
{
"chainId": 1,
"contractAddress": "0x1a17d9bCbC4b077C69d7f93155408995144A277F",
"deliveredIn": "2022-08-31T03:53:00.001Z",
"reason": null,
"scheduledTo": "2022-08-31T03:50:00.001Z",
"status": "processing",
"tokenId": "1",
"txHash": "0x44d5e936dad202ec600b6a6a5252ef32c0e29bb9a21b179e348d2e8029cc1c86",
"externalId": "123",
"id": "123e4567-e89b-12d3-a456-426614174000"
}
],
"reason": null,
"status": "processing",
"userStatus": "notFound"
}
Last updated