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 - Order 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
For test orders, it will be automatically changed to "in_production" status after 5 minutes, and "shipped" status after another 5 minutes. The tracking number will be notified by Webhook Notification - Tracking Number.

Request

Body Params application/json
event
object 
required
uuid
string 
required
UUID of the event.
name
enum<string> 
required
Allowed value:
order_notify
status
enum<string> 
required
The order's status.
Allowed values:
new_orderin_productionon_holdcancelledrejectedshippedin_production_cancelled
timestamp
string 
required
When the event occurred.
data
object 
required
The latest data of the order. This data matches the same format as the GET requests.
id
integer 
required
order_id
string 
required
test_order
boolean 
required
sample_order
boolean 
required
reprint_order
boolean 
required
created_at
string 
required
updated_at
string 
required
status
string 
required
rejected_at
null 
required
rejected_status
null 
required
The order's reject status. Possible values: "IP Violation", "Invalid Artwork", "Invalid Address", "Out of stock", "Customer Changed Mind", "Invalid Label Url"
cancelled_at
null 
required
line_items
array [object {6}] 
required
trackings
object 
required
shipping_method
string 
required
ioss_number
null 
required
tax_id
null 
required
tax_id_type
null 
required
address
object 
required
return_address
null 
required
total_cost
null 
required
Example
{
  "event": {
    "uuid": "321ad951-9b89-46e1-849a-8b345db22585",
    "name": "order_notify",
    "status": "in_production",
    "timestamp": "2022-07-08T11:11:14.797781Z"
  },
  "data": {
    "id": 585278,
    "order_id": "OD-123",
    "test_order": false,
    "sample_order": false,
    "reprint_order": false,
    "created_at": "2022-05-12T06:47:50.000000Z",
    "updated_at": "2022-05-25T16:26:45.000000Z",
    "status": "in_production",
    "rejected_at": null,
    "rejected_status": null,
    "cancelled_at": null,
    "line_items": [
      {
        "id": 745626,
        "sku": "UNPT1K00M",
        "quantity": 1,
        "order_item_id": "733117061",
        "print_files": [
          {
            "key": "front",
            "url": "https://via.placeholder.com/2400/09f/fff.png"
          }
        ],
        "preview_files": [
          {
            "key": "front",
            "url": "https://via.placeholder.com/2400/09f/fff.png"
          }
        ]
      }
    ],
    "trackings": [],
    "shipping_method": "standard",
    "ioss_number": null,
    "tax_id": null,
    "tax_id_type": null,
    "address": {
      "name": "John Smith",
      "email": null,
      "company": "DEMO",
      "phone": "(330) 638-1331",
      "street1": "4736 Phillips Rice Rd",
      "street2": null,
      "city": "Cortland",
      "state": "OH",
      "country": "US",
      "zip": "44410"
    },
    "return_address": null,
    "total_cost": null
  }
}

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": "321ad951-9b89-46e1-849a-8b345db22585",
        "name": "order_notify",
        "status": "in_production",
        "timestamp": "2022-07-08T11:11:14.797781Z"
    },
    "data": {
        "id": 585278,
        "order_id": "OD-123",
        "test_order": false,
        "sample_order": false,
        "reprint_order": false,
        "created_at": "2022-05-12T06:47:50.000000Z",
        "updated_at": "2022-05-25T16:26:45.000000Z",
        "status": "in_production",
        "rejected_at": null,
        "rejected_status": null,
        "cancelled_at": null,
        "line_items": [
            {
                "id": 745626,
                "sku": "UNPT1K00M",
                "quantity": 1,
                "order_item_id": "733117061",
                "print_files": [
                    {
                        "key": "front",
                        "url": "https://via.placeholder.com/2400/09f/fff.png"
                    }
                ],
                "preview_files": [
                    {
                        "key": "front",
                        "url": "https://via.placeholder.com/2400/09f/fff.png"
                    }
                ]
            }
        ],
        "trackings": [],
        "shipping_method": "standard",
        "ioss_number": null,
        "tax_id": null,
        "tax_id_type": null,
        "address": {
            "name": "John Smith",
            "email": null,
            "company": "DEMO",
            "phone": "(330) 638-1331",
            "street1": "4736 Phillips Rice Rd",
            "street2": null,
            "city": "Cortland",
            "state": "OH",
            "country": "US",
            "zip": "44410"
        },
        "return_address": null,
        "total_cost": null
    }
}'

Responses

⚪0Webhook Notification - Order Status Change Example
text/plain
Body
object {0}
Previous
Unsubcribe to webhook
Next
Webhook Notification - Tracking Number Example
Built with