SwiftPOD
  1. Webhook
SwiftPOD
  • Api
    • Webhook
      • List Webhooks
        GET
      • Subscribe to Webhook
        POST
      • Unsubcribe to webhook
        DELETE
      • Webhook Notification - Order Status Change Example
        POST
      • Webhook Notification - Tracking Number Example
        POST
      • Webhook Notification - In Transit and Delivered Status Example
        POST
      • Webhook Notification - Stock Status Change Example
        POST
    • Orders
      GET
    • Create Order
      POST
    • Create Multiple Orders
      POST
    • Get Order
      GET
    • Update Order
      PUT
    • Update Order Status
      PUT
    • Cancel Order
      POST
    • Catalogs
      GET
  • Changelog
  1. Webhook

Webhook Notification - Stock Status Change Example

POST
https://your.endpoint.here
Data
The data will be sent as a POST call to your webhook url. The data will be formatted as JSON and sent over in the following format

Request

Body Params application/json
event
object 
required
uuid
string 
required
UUID of the event.
name
enum<string> 
required
Allowed value:
stock_notify
timestamp
string 
required
Indicating when the event occurred.
data
object 
required
Contains the latest stock-related information in the same format as GET requests.
id
string 
required
name
string 
required
sku
string 
required
color
string 
required
style
string 
required
size
string 
required
brand
string 
required
print_areas
array[string]
required
stock
integer 
required
status
enum<string> 
required
There are three available status values
Allowed values:
in_stockout_of_stockdiscontinued
Example
{
  "event": {
    "uuid": "4e3f192a-c674-4de1-adb1-2f12e1adc62f",
    "name": "stock_notify",
    "timestamp": "2022-07-08T13:24:00.128774Z"
  },
  "data": {
    "id": "745626",
    "name": "BELLA",
    "sku": "UNPT1K00M",
    "color": "Black",
    "style": "3001",
    "size": "L",
    "brand": "BELLA",
    "print_areas": [
      "front",
      "back"
    ],
    "stock": 10,
    "status": "discontinued"
  }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://your.endpoint.here' \
--header 'Content-Type: application/json' \
--data-raw '{
    "event": {
        "uuid": "4e3f192a-c674-4de1-adb1-2f12e1adc62f",
        "name": "stock_notify",
        "timestamp": "2022-07-08T13:24:00.128774Z"
    },
    "data": {
        "id": "745626",
        "name": "BELLA",
        "sku": "UNPT1K00M",
        "color": "Black",
        "style": "3001",
        "size": "L",
        "brand": "BELLA",
        "print_areas": [
            "front",
            "back"
        ],
        "stock": 10,
        "status": "discontinued"
    }
}'

Responses

🟢200Success
application/json
Body
object {0}
Example
{}
Previous
Webhook Notification - In Transit and Delivered Status Example
Next
Orders
Built with