Printway API Document
  • ๐ŸŽ‰Welcome to Printway API
  • ๐Ÿ”Authentication
  • ๐Ÿ›’Products
    • ๐Ÿ“‘List products
    • ๐ŸงพDetail products
    • Break of products
  • ๐Ÿ“œOrders
    • ๐Ÿ“”List order synced
    • ๐Ÿ“‹Detail Order Synced
    • ๐Ÿ“ฅCreate order
    • โž•Create order v2
    • โž•Create order v3 (Beta)
    • โ‰๏ธTest price order (Updated)
  • ๐Ÿ“คWebhook
  • โฌ†๏ธWebhook Update Status Order (New)
Powered by GitBook
On this page

Webhook

//
You can register webhook for tracking with this endpoint. 

Our API only supports :
  - Content-Type : application/json

POST https://api.printway.io/cdn/api/webhook/v1/register

Headers

Name
Type
Description

PW-ACCESS-TOKEN*

String

The Access Token

Request Body

Name
Type
Description

type*

String

list: Get Webhook information registered

create: Register new webhook

update: Update webhook registered

endpoint*

String URL

Your endpoint for us to send tracking when available (Required with type: create)

status

Number

0: Inactive

1: Active

Default: 1

access_token

String

Your access token (Optional)

access_key

String

Your Access Key (Optional)

{
   "status": 200,
   "message": "Registered webhook successfully!",
   "endpoint": "https://api.printway.io/webhook/send-tracking",
   "access_key": "",
   "access_token": "",
   "status": "Active", // - Inactive
   "request_body": {
      "order_id": "--- Your Order ID ---",
      "tracking_number": "--- Tracking Number ---",
      "tracking_url": "--- Tracking Url ---"
   },
   "request_header": {
      "Content-Type": "application/json",
      "--- Your Access key ---" : "----- Your access token registered -----"
   }
}
{
    "status": 401,
    "message": "Not authenticated"
}
{
    "status": 400,
    "message": "Not found! No registered webhook."
}
// This is my request body send via webhook

{
    "order_id": "abcdf121323",
    "tracking_number": "45121646131321321313163",
    "tracking_url": "https://..."
}
PreviousTest price order (Updated)NextWebhook Update Status Order (New)

Last updated 2 years ago

๐Ÿ“ค