API

Custom channel webhooks

Set up inventory and shipment webhooks for custom channels

Last updated July 9th, 2020

When either an dropshipment or fulfillment (in-house) shipment is generated within Jetti, a POST request is made to the webhook endpoint specified in under the custom channel settings. This request will be sent with the following payload, detailing the shipment details, items shipped and the parent order.

{
    "instance": {
        "labelUris": [],
        "packingHeight": 13.3,
        "packingWidth": 11.5,
        "packingDepth": 2.4,
        "price": 0,
        "grams": 0,
        "id": 226,
        "companyId": 612,
        "userId": null,
        "purchaseId": 366,
        "saleId": 433,
        "manifestId": null,
        "carrierPickupId": null,
        "purchaseImportExternalId": null,
        "source": "sale",
        "inventoryStatus": "shipped",
        "channelError": null,
        "reference": "10001-01-01",
        "externalId": null,
        "vendorExternalId": null,
        "requiresShippingApproval": "notRequired",
        "distanceUnit": "in",
        "weightUnit": "g",
        "totalWeight": 0,
        "files": null,
        "labelFiles": null,
        "channelAttempts": 0,
        "trackingCompany": "RoyalMail",
        "trackingNumber": "ABC123",
        "provider": null,
        "serviceLevel": null,
        "serviceLevelTerms": null,
        "days": null,
        "durationTerms": null,
        "quoteId": null,
        "trackingStatus": null,
        "trackingStatusDate": null,
        "trackingStatusDetails": null,
        "shippoLabelIds": null,
        "labelUrl": null,
        "labelFileFormat": null,
        "trackingUrl": null,
        "commercialInvoiceUrl": null,
        "labelError": null,
        "labelRefund": false,
        "tags": null,
        "aftershipId": null,
        "createdAt": "2019-07-03T09:53:49.905Z",
        "updatedAt": "2019-07-03T09:53:49.988Z",
        "muteError": false,
        "adminNotes": null,
        "intercomMessageId": null
    },
    "fulfillmentItems": [{
        "id": 226,
        "companyId": 612,
        "dropshipmentId": 226,
        "saleItemId": 479,
        "purchaseItemId": 366,
        "purchaseImportExternalId": null,
        "source": "sale_item",
        "quantity": 10,
        "createdAt": "2019-07-03T09:53:49.936Z",
        "updatedAt": "2019-07-03T09:53:49.936Z",
        "sale_item": {
            "inventoryStatus": "fulfilled",
            "invoiceStatus": "notInvoiced",
            "isComponent": false,
            "returnStatus": "notReturned",
            "displayName": "HACK",
            "tax": 0,
            "price": 10,
            "subtotal": 100,
            "id": 479,
            "saleId": 433,
            "bundleSaleItemId": null,
            "cloneSaleItemId": null,
            "externalId": null,
            "externalVariantId": null,
            "quantityCancelled": 0,
            "quantityRefunded": 0,
            "discounts": null,
            "channelPrice": null,
            "channelCompareAtPrice": null,
            "companyId": 612,
            "variantId": 605,
            "locked": false,
            "name": "HACK",
            "notes": null,
            "quantity": 10,
            "taxable": false,
            "taxRate": null,
            "inventoryProcessed": 10,
            "quantityInvoiced": 0,
            "quantityReturned": 0,
            "bundleQuantity": 0,
            "isBundle": false,
            "properties": null,
            "createdAt": "2019-07-03T09:53:44.311Z",
            "updatedAt": "2019-07-03T09:53:49.969Z"
        }
    }],
    "sale": {
        "total": 0,
        "subtotal": 0,
        "discounts": 0,
        "tax": 0,
        "combinedTaxRate": "0.0000",
        "id": 433,
        "companyId": 612,
        "userId": 692,
        "priceListId": 612,
        "channelId": 670,
        "warehouseId": 612,
        "customerId": 434,
        "saleDiscountCodeId": null,
        "saleId": null,
        "cloneReason": null,
        "externalId": "test123",
        "lastPurchaseReference": 1,
        "lastSaleReturnReference": 0,
        "lastFulfillmentReference": 0,
        "status": "pending",
        "internalNotes": null,
        "inventoryStatus": "fulfilled",
        "cancelReason": null,
        "channelCancelledAt": null,
        "shipstationId": null,
        "adjustmentReasonId": null,
        "reference": "10001",
        "locked": false,
        "finalized": true,
        "cancelled": false,
        "cancelledAt": null,
        "dateOrdered": "2019-07-03T09:53:42.139Z",
        "taxShipping": true,
        "taxIncluded": false,
        "weight": 0,
        "quantity": 0,
        "stateTaxRate": null,
        "cityTaxRate": null,
        "countyTaxRate": null,
        "districtTaxRate": null,
        "stateTaxLocation": null,
        "cityTaxLocation": null,
        "countyTaxLocation": null,
        "paymentStatus": "notPaid",
        "invoiceStatus": "notInvoiced",
        "returnStatus": "notReturned",
        "cancellationStatus": "none",
        "notes": null,
        "customerReference": null,
        "tags": ["dropship"],
        "billingFirstName": "sale billing-first-name",
        "billingLastName": null,
        "shippingFirstName": "sale first-name",
        "shippingLastName": "sale last-name",
        "invalidShippingAddress": true,
        "shippingAddressMessage": "The address as submitted could not be found. Please check for excessive abbreviations in the street address line or in the City name.",
        "invalidBillingAddress": false,
        "billingAddressMessage": null,
        "billingName": "sale billing-name",
        "billingAddressLineOne": "sale billing-address-line-one",
        "billingAddressLineTwo": "sale billing-address-line-two",
        "billingCity": "sale billing-city",
        "billingState": "sale billing-state",
        "billingCountry": "sale billing-country",
        "billingZip": "sale billing-zip",
        "shippingName": "sale shipping-name",
        "shippingAddressLineOne": "sale shipping-address-line-one",
        "shippingAddressLineTwo": "sale shipping-address-line-two",
        "shippingCity": "Beverly Hills",
        "shippingState": "California",
        "shippingCountry": "US",
        "shippingZip": "90210",
        "receiverName": null,
        "receiverAddressLineOne": null,
        "receiverAddressLineTwo": null,
        "receiverCity": null,
        "receiverState": null,
        "receiverCountry": null,
        "receiverZip": null,
        "createdAt": "2019-07-03T09:53:42.140Z",
        "updatedAt": "2019-07-03T09:53:49.883Z",
        "muteError": false,
        "adminNotes": null,
        "intercomMessageId": null,
        "channel": {
            "shipstationUrl": "http://localhost:5000/api/channels/670/shipstation.xml",
            "displayName": "Cin7",
            "freeShippingThreshold": null,
            "id": 670,
            "companyId": 612,
            "priceListId": 612,
            "warehouseId": 612,
            "dropshipProviderId": null,
            "name": "Cin7",
            "parentChannel": "custom",
            "warehouseSync": "default",
            "sendShippingNotification": true,
            "dropshipRouting": "default",
            "dropshipTags": [],
            "skipTags": [],
            "includeSaleTags": false,
            "connectedAt": null,
            "automaticallyCancelSales": true,
            "importUnpaidSales": false,
            "salePrefix": null,
            "automaticallyFinalizeSales": true,
            "purchasePrefix": null,
            "syncAddressUpdates": true,
            "syncPricing": true,
            "syncCostPrices": true,
            "inventorySync": "all",
            "hideWhenNoCostPrice": null,
            "syncImages": true,
            "publishProducts": true,
            "automaticallyPublish": true,
            "publishProductsWithoutPrice": true,
            "unpublishNoInventory": false,
            "taxShipping": true,
            "maxShippingCost": null,
            "maxShippingCostThreshold": null,
            "freeShippingOverride": null,
            "freeShippingName": null,
            "freeShippingCode": null,
            "taxIncluded": true,
            "productsImportedAt": null,
            "collectionEndpoint": null,
            "weightUnit": "g",
            "variantLogging": false,
            "saleLogging": false,
            "connectToFeed": null,
            "exportToShipstation": null,
            "shipstationUsername": null,
            "shipstationPassword": null,
            "pdfLegal": null,
            "importProductsSeconds": null,
            "requireVendorName": null,
            "checkoutString": null,
            "routingPriorityOne": "inStock",
            "routingPriorityTwo": "none",
            "routingPriorityThree": "none",
            "noRatesError": false,
            "createdAt": "2019-07-03T09:53:41.970Z",
            "updatedAt": "2019-07-03T09:53:41.970Z"
        }
    }
}

Jetti expects back as a response a payload containing a unique ID of the shipment generated in the custom channel. This is used to verify the external shipment notification was success. The dropshipment or fulfillment object will be updated with this externalId, which can be used to reconcile data at a later date if needed.

{
    "externalId": "1234"
}
Back to API