PageSourceSearch

https://docs.curri.com/assets/js/36445df5.75d6b547.js

js curri.com collected 2026-09-24 10:25:58 UTC 7,015 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_curri_docs=self.webpackChunk_curri_docs||[]).push([[1308],{2313:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"webhooks-errors-statuses/webhooks","title":"Webhooks","description":"Webhooks allow you to receive real-time updates for your active deliveries. We\'ll POST updates to a","source":"@site/docs/webhooks-errors-statuses/00-webhooks.md","sourceDirName":"webhooks-errors-statuses","slug":"/webhooks-errors-statuses/webhooks","permalink":"/docs/webhooks-errors-statuses/webhooks","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":0,"frontMatter":{"title":"Webhooks"},"sidebar":"docs","previous":{"title":"Appendix","permalink":"/docs/queries-and-mutations/appendix"},"next":{"title":"Errors","permalink":"/docs/webhooks-errors-statuses/errors"}}');var r=o(678),t=o(9787);const i={title:"Webhooks"},a=void 0,l={},d=[{value:"Configuring Webhook Ingestion Endpoint",id:"configuring-webhook-ingestion-endpoint",level:4},{value:"Summary",id:"summary",level:4},{value:"Sandbox",id:"sandbox",level:4},{value:"Example Payload",id:"example-payload",level:4},{value:"Final adjusted price",id:"final-adjusted-price",level:4}];function c(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",ul:"ul",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["Webhooks allow you to receive real-time updates for your active deliveries. We'll ",(0,r.jsx)(n.code,{children:"POST"})," updates to a\nURL of your choosing every ",(0,r.jsx)(n.em,{children:"20 seconds"}),", allowing you to get the most up-to-date information to show to your customers."]}),"\n",(0,r.jsx)(n.h4,{id:"configuring-webhook-ingestion-endpoint",children:"Configuring Webhook Ingestion 
1Endpoint"}),"\n",(0,r.jsxs)(n.p,{children:["To setup webhooks for your account, please ",(0,r.jsx)(n.a,{href:"mailto:[email protected]",children:"get in touch"}),".\nWe'll configure your account to send webhooks to a specific URL."]}),"\n",(0,r.jsx)(n.h4,{id:"summary",children:"Summary"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Webhooks sent every 20 seconds"}),"\n",(0,r.jsx)(n.li,{children:"Sent until delivery is terminated (delivered, canceled, returned, etc.), plus one more if the final price settles afterwards"}),"\n",(0,r.jsx)(n.li,{children:"Images attached as your delivery progresses"}),"\n",(0,r.jsx)(n.li,{children:"Location updated as your delivery progresses"}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"sandbox",children:"Sandbox"}),"\n",(0,r.jsx)(n.p,{children:"Deliveries booked with your Sandbox key will simulate a delivery. Your\nsandboxed delivery will cycle through the appropriate statuses, which you will\nbe able to observe through the webhook."}),"\n",(0,r.jsx)(n.h4,{id:"example-payload",children:"Example Payload"}),"\n",(0,r.jsx)(n.p,{children:"You can find an example webhook payload below:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n  "id": "del_XXXXXXXXXX",\n  "trackingUrl": "https://app.curri.com/track/C-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",\n  "meta": {\n    "orderNumber": "ABCDEFG",\n    "poNumber": "abcdefg",\n    "bolNumber": "1234567",\n    "pickupNote": "",\n    "dropoffNote": ""\n  },\n  "origin": {\n    "name": "Los Angeles Airport",\n    "addressLine1": "1 World Way",\n    "addressLine2": "",\n    "city": "Los Angeles",\n    "state": "CA",\n    "postalCode": "90045",\n    "latitude": "33.9432786",\n    "longitude": "-118.4238303"\n  },\n  "destination": {\n    "name": "Long Beach Airport",\n    "addressLine1": "4100 Donald Douglas Dr",\n    "addressLine2": "",\n    "city": "Long Beach",\n    "state": "CA",\n    "postalCode": "90808",\n    "latitude": "36.7905004",\n    "longitude": "-106.4353203"\n  },\n  "distance": "12345",\n  "estimatedTravelTime": "6789",\n  "deliveryMethod": "car",\n  "driver": {\n    "id": "driver_XXXXXXXXXX",\n    "firstName": "John",\n    "lastName": "Smith",\n    "phoneNumber": "+13235555555",\n    "activeVehicle": {\n      "make": "Make",\n      "model": "Q5",\n      "trim": "Trim",\n      "year": 2020,\n      "color": "Black"\n    }\n  },\n  "location": {\n    "latitude": 33.9432786,\n    "longitude": -118.4238303\n  },\n  "accountLocation": "My Branch",\n  "price": "12345",\n  "finalAdjustedPrice": "12345",\n  "chargeType": "delivery",\n  "images": ["https://path/to/file/A", "https://path/to/file/B"],\n  "status": "delivered",\n  "cancellationReason": null,\n  "createdAt": "2025-09-20T12:30:00.000Z",\n  "scheduledAt": null,\n  "deliveredAt": "2025-09-20T14:45:00.000Z",\n  "isSandbox": false\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:["When the delivery is canceled (",(0,r.jsx)(n.code,{children:"status"})," is ",(0,r.jsx)(n.code,{children:'"canceled"'}),"), ",(0,r.jsx)(n.code,{children:"cancellationReason"})," is one of the ",(0,r.jsx)(n.a,{href:"/docs/webhooks-errors-statuses/cancellation-reasons",children:"cancellation reason"})," values (e.g. ",(0,r.jsx)(n.code,{children:'"User Requested"'}),", ",(0,r.jsx)(n.code,{children:'"Driver Issue"'}),"). When the delivery is not canceled, ",(0,r.jsx)(n.code,{children:"cancellationReason"})," is ",(0,r.jsx)(n.code,{children:"null"}),"."]}),"\n",(0,r.jsx)(n.h4,{id:"final-adjusted-price",children:"Final adjusted price"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"price"})," is the quote from booking and never changes. ",(0,r.jsx)(n.code,{children:"finalAdjustedPrice"})," is the\nsettled order total \u2014 what the delivery is actually billed \u2014 and ",(0,r.jsx)(n.code,{children:"chargeType"}),"\nsays what that amount represents: ",(0,r.jsx)(n.code,{children:'"delivery"'}),", ",(0,r.jsx)(n.code,{children:'"cancellation_fee"'}),", or\n",(0,r.jsx)(n.code,{children:'"no_charge"'}),". Both are ",(0,r.jsx)(n.code,{children:"null"})," until an order total exists."]}),"\n",(0,r.jsxs)(n.p,{children:["The two diverge whenever a delivery is repriced or canceled: a canceled delivery\nkeeps its original ",(0,r.jsx)(n.code,{children:"price"})," while ",(0,r.jsx)(n.code,{children:"finalAdjustedPrice"})," drops to the cancellation\nfee. Because the total can settle after the delivery ends, Curri sends another\nwebhook when it moves \u2014 a repeat request on an already-terminal delivery is an\nupdated price, not a duplicate. Bill from ",(0,r.jsx)(n.code,{children:"finalAdjustedPrice"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},9787:(e,n,o)=>{o.d(n,{R:()=>i,x:()=>a});var s=o(6166);const r={},t=s.createContext(r);function i(e){const n=s.useContext(t);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.