API changelog
Every change to the Poppelo REST API, webhooks and MCP server that a client can observe, newest first, with what to change.
Changes an API or MCP client can observe, newest first. The OpenAPI document at /docs/json stays the reference for request and response shapes; this page records behaviour changes and what, if anything, you need to change.
Onboarding asks for delivery before the test order
- The guided steps run inbox, destination, verify.
POST /onboarding/guidedtakes the steps in the order basics, documents, connect-inbox, destination, verify, done, so the test document is read after QuickBooks or Shopify is connected and its catalog is in place. The step names and each step'sdataare unchanged; senddestinationbeforeverify. nextStepfollows the new order. Afterconnect-inboxit isdestination, with or withoutskippedInbox(a skipped inbox used to answerdone, and a connected oneverify). Afterdestinationwith amodeit isverify(it wasdone), and afterverifyit isdone(it wasdestination).destinationwithmode: "policy"still answersdestination. If you follownextStep, nothing else changes.verifywithskippedTestno longer moves the saved step todestination. It records the flag and the saved step advances as for any other step.GET /onboarding/statusaddsdeliveryChosenandtestFinished.deliveryChosenis true once a delivery choice was saved ondestination(formode: "connect", only once the QuickBooks or Shopify connection is active).testFinishedis true onceverifywas left withskippedTest, true or false.resumeStepuses the new order.- Progress saved under the old order resumes without redoing a finished step. A setup saved on
verifybefore its delivery choice resumes ondestination, thenverify. One that left the test but has no delivery choice resumes ondestinationand can finish from there (testFinishedis true). Nothing stored is rewritten. - The finish check accepts the same saved steps as before.
doneis accepted once the saved step isdestinationorverify, orconnect-inboxwithskippedInbox; otherwise it still answers409 ONBOARDING_STEP_ORDER. - The document type is still written only at
done. When the answer ondocumentsis supplier invoices alone, finishing still marks every active channelconfig.documentTypeDefault: "invoice", and no earlier step does.
Re-approved holds are checked again, failed sends and held orders on the attention list
- A new approval is checked again before it is sent. When an order's destination held it before anything was sent (
ECONOMIC_SAFETY_REFUSEDorREVISION_REQUIRES_MANUAL) and a person approves it again, the destination is judged against the order as it stands now: it posts, or it is held again with today's reason. It used to be held again with the old reason, even after the cause was fixed. An order held before the cent-rounding fix of 2026-11-21 now posts when it is approved again. - Approved orders held at the destination are no longer in the review queue.
GET /review(and itspagination.total) leaves out an approved order its destination held on the order's own data;GET /attentionlists it under the newheldlist (withreason, andcounts.held, cursorheldBefore). Correct it and approve it again from/review/:envelopeId.GET /metricscounts it as a decided, approved order, with its value, and not inprocessing.pendingReview. - Failed sends are not documents that could not be read. An order that was read and approved and whose send then failed (the destination refused it, or the connection errored) is no longer in
GET /attentionfailed: it is in the newdeliveryFailedlist (destinationId,destinationName,errorMessage,errorCode,retryable;counts.deliveryFailed, cursordeliveryFailedBefore). Send it again withPOST /orders/:orderId/destinations/:destinationId/retrywhenretryableis true; otherwise reconcile it on the order first. Do not re-read it withPOST /orders/:envelopeId/reprocess. approvedAton approved orders not sent.GET /attentionpendingExportanddeliveryFailedrows addapprovedAt: when the order was last approved, by a person or automatically, or null when no approval is recorded.createdAtis still when the document came in.statusLabel,heldReasonanddeliveryStateon orders.GET /ordersrows andGET /orders/:orderIdaddstatusLabel(the words the orders page and the CSVstatusLabelcolumn use),heldReasonanddeliveryState(held,send_failedor null). A held order is labelled held and not sent, and a failed send names the destination that refused it. Thestatuscodes are unchanged.- No web page in a destination error. When an endpoint answers with HTML (for example a
405from a static site), the error names the status in words ("Your endpoint answered HTTP 405 (Method Not Allowed)."), in the envelope'serrorMessage, the destination'slastErrorand its technical detail. Rows stored earlier are presented the same way. INVALID_IMAP_HOSTdetails are the validation array.POST /channelsandPATCH /channels/:channelIdanswer400 INVALID_IMAP_HOSTwithdetailsas[{ path, message, code }](body.config.imapPortwithinvalid_port, orbody.config.imapHostwithinvalid_host) instead of{ host }. A port other than 993 or 143 reads "Use port 993 for SSL or 143 for STARTTLS."
Order totals in the review queue and the orders CSV, and approve link acknowledgements
- Review queue
orderValueis the order total.GET /reviewrows state each line round(quantity × unit price) less its discount, plus the PO's charges (freight, tax, order discounts): the figureGET /orders/:orderIdorderTotal, the review page and the exported file state. It was the lines' value when the order was read, without discounts or charges. Null when a line has no price.sortBy=orderValueand the default queue order still sort on the value recorded when the order was read. - Orders CSV
totalAmountis the order total.GET /orders/exportkeeps the column's name and place; its value is now the same order total, to the cent (a PO with $580.00 of lines, a $58.00 trade discount and $75.00 freight reads597.00, not580.00). The cell is empty when a line has no price or the order has no lines, where it read0.00. Each line rounds half away from zero on the decimal, so 1 × 132.225 counts as 132.23. GET /approve-links/:tokenlines are net of their discount. Each line addsdiscount, andlineTotalis round(quantity × unit price) less that discount, as on the order page, so the lines add up tolinesTotal. The summary addschecks: the checks that did not pass, failures first, at most five, each withvalidatorName,status,messageanddetails.reasonskeeps the messages.- Approve links take acknowledgements. When
POST /approve-links/:tokenanswers409 APPROVAL_NEEDS_ACKNOWLEDGEMENT, nothing is approved and the link stays usable; resend with the body{ "acknowledge": { "unmatchedLines": true, "unknownCustomer": true, "duplicatePo": true } }for the onesdetails.requirednames, as onPOST /review/:envelopeId/approve. A tap with no body works as before; a body with another property answers400 VALIDATION_ERROR. POST /reference-data/customersrefuses an unknown property with400 VALIDATION_ERRORanddetailsnaming each one ([{ "path": "body.emailDomains", "message": "is not a known property", "code": "additionalProperties" }]), and stores nothing. It used to drop the property and create the customer without it.- A hold for a total the destination cannot take names the charges. When a PO's printed total differs from its lines because of charges read off it, and the destination (custom REST or NetSuite) cannot take charges, the
economic_completenessmessage and the hold reason name them, for example "This order has Trade Discount 10% −$58.00 and Freight $75.00, which your own system can't receive as separate charges…". The order is held exactly as before.
One validation error shape, delivery health per connection, and empty DELETE bodies
- One shape for
VALIDATION_ERRORdetails, on every route.error.detailsis always an array of{ path, message, code }, with the path written as the schema check writes it: the request part, then dots, an index in brackets (body.config.imapHost,body.exportConfig.delivery.email,body.document,querystring.status). Routes that sent{ formErrors, fieldErrors },{ field, reason, value }or a JSON pointer such as/documentnow send the array; a formerreasonis the entry'scode, and other facts stay on the entry (value,receivedType). If you readdetails.fieldErrors, readdetails[].pathinstead. - An empty JSON body no longer needs
Content-Length: 0. ADELETE, or aPOSTwhose body is optional, sent withContent-Type: application/jsonand no body is accepted when it has noContent-Length(what Node'sfetchandcurl -X DELETEsend) or an empty chunked body. A route that requires a body still answers400. - Approve refuses a correction to a line the order does not have.
POST /review/:envelopeId/approveanswers400 INVALID_CORRECTION_FIELDwithdetails.fieldwhenlineItems[<index or id>]names no line of the order (an index past the last line, or another order's line id). Nothing is changed; before, the correction was dropped and the order approved. POST /channelssigns in to a mailbox before storing it. A refused sign-in answers400 CONNECTION_VERIFICATION_FAILEDwith the server's reason,details.errorKind(authentication_failed,connectionorhost_rejected) anddetails.field, and nothing is stored.CHANNEL_EXISTSadvises editing the existing channel only when it has settings to edit.- Older forwarding-address channels no longer block a mailbox. An email channel from before the forwarding marker existed, with no mail server, is now marked as the forwarding address (
config.via: "shared-intake"), so connecting your own mailbox no longer answers409 CHANNEL_EXISTS. Forwarded mail keeps going to the same channel. Where an account had two such channels, the one forwarded mail was delivered to stays and the other is archived. - Delivery health per connection.
GET /integrations/statusaddsinstances[].delivery:state(healthy,error,idle,no_activity),reason,sent,couldNotSend(failed, or held for a person at that connection),waiting,lastSentAt,lastProblemAt,lastProblem,lastTestandrecent(each withdocumentTypeandreference, the PO or invoice number). It counts only what was sent to that connection, and a failed connection test reads aserror.POST /connectors/custom_rest/testis now recorded as a connection test. GET /golden-datarows addreferenceCustomerId, null when the order was approved without a customer from your list; partner checks read only orders of a listed customer.- Revoking a trusted customer clears
grantedByandgrantedAt. The activity log keeps who granted it. - Public
GET /api/v1/health/status: a dead-lettered message degrades the status only while the dead-letter count has grown within the last hour. One stuck message no longer holds the status atdegraded; the operator form still reports the count.
Order totals on approve links, exported order files and sub-cent prices
GET /approve-links/:token:totalis now the order total (lines less their discounts plus the PO's charges, asGET /orders/:orderIdorderTotalstates it);linesTotal,charges,chargesTotalandorderTotalare added. While the link can still approve,reasonslists the checks that did not pass and each line addsflagged.- Unit prices with more than two decimals. A line of 1 × 132.225 is 132.23, as the line total is stored and printed, and an order whose lines and printed total agree to the cent is no longer refused by a custom REST, QuickBooks or Shopify destination for a difference under a cent. A difference of a cent or more is still held.
POST /review/:envelopeId/approve: a custom REST or NetSuite destination whose order economics will be held (for example a printed total that includes freight) is returned withwillHold: trueand the reason, instead ofwillHold: falsefollowed by a hold after approval.Customer Numberin exported order files (CSV and Excel) now falls back to the customer number the PO prints (the account number read off the document) when the order is not matched to one of your customers. A matched customer's number in your system still wins. The column keeps its name and place.- Appended
Line Discountcolumn at the end of the default exported order file layout: the line's printed discount (the amountLine Totalalready takes off), two decimals, empty when the PO prints none. Existing columns keep their names and places. - One rounding to the cent everywhere: amounts round on the decimal value, half away from zero, as the database does (1 × 132.225 = 132.23, 7 × 2.675 = 18.73).
GET /orders/:orderIdtotals, exported files and the posting checks now agree on such lines. - Money cells always carry two decimals:
Unit Price,Line Total,Charges Total,Order Total, and in custom layouts the line discount, the printed line amount and the per-type charge totals (45.00,6.50,-73.20). A unit price printed with more decimals keeps every digit (0.125); nothing is rounded. Excel cells stay numbers, shown with two decimals. - Order-level columns repeat on every line row (PO number, customer, addresses,
Charges,Charges Total,Order Total), as before. Add upLine Totalfor an order's value, notOrder Total.
One match score everywhere, purchase-order metrics and review queue search
- One match score, everywhere.
GET /review/:envelopeIdaddsorder.matchScoreandorder.matchScorePercent, the same routed scoreGET /review,GET /ordersandGET /orders/:orderIdalready return.GET /invoicesandGET /invoices/:invoiceIdaddmatchScoreandmatchScorePercenttoo, andGET /invoices?sortBy=confidenceScorenow sorts on that routed score. The review page, the review queue, the order timeline and every email (needs review, supplier invoice needs review, rejected automatically) now print that number as a whole percent. TheGET /metricsconfidence bands and averages,GET /metrics/timeseries,/customers,/channels,/export, the threshold recommendation andGET /metrics/threshold-impactread it too, so "under 70%" counts the orders the list shows under 70%.confidenceScorekeeps its meaning (the extraction score before validation adjusted it). - Orders CSV export: the
confidencecolumn keeps its name and place for scripts that read it, but it is the extraction score, not the match score people see. ReadmatchScorePercent. GET /reviewtakesqin the app and the MCP tool. The review queue's search box sendsq(PO number or customer name); thelist-review-queueMCP tool acceptsq. Each queue row addsshipByKind:shipwhen the PO printed a ship date,deliverywhenshipByis its delivery date because it printed none, null with no date.- Value of approved orders is the order total.
GET /metricsvolume.dollarValueTotalanddollarValue30d, andGET /metrics/trustthroughput.dollarValueProcessedandcurrentPeriod.dollarValueProcessedCents, sum each approved purchase order's total as the exported file states it: the lines less line discounts, plus the charges read off the PO (freight, tax, order discounts). They summed the lines alone. Supplier invoices are still not counted. - "This calendar month" counts purchase orders.
GET /metrics/trustcurrentPeriodaddsautoApprovedOrders,approvedByPersonOrders,rejectedOrdersandmanualHandlingOrders, purchase orders only; an undone decision is not counted.straightThroughRatePctis now over purchase orders.billableOrders,billableAutoApproved,billableReviewed,reviewedFreeandmanualHandlingFreeare unchanged: they are what the plan counts. - ROI statement (
GET /metrics/roi/statement, its CSV and email):volumecounts purchase orders only.volume.reviewedis now the orders a person approved (it counted every decision, rejections and supplier invoices included),volume.rejectedis added (appended asvolumeRejectedin the CSV), andvolume.totalis automatic + approved + rejected + manual.money.estimatedOverageCentsis unchanged. GET /orders/:orderIdaddsexportMethod,exportFormatandexportDeliveredTo, as the list rows have them.- Price check messages are in money words, for example "$14.80 is 70% below your price for LTR-REFILL-3 ($48.93)." (a validation result's
details.lineResults[].message, andCORRECTION_INVALIDdetails.failures[].message). The figures are unchanged indetails. - The "Couldn't process" email names the file, the sender and when it arrived, and says what went wrong in the words the Couldn't process page uses.
A complete OpenAPI document, and structured MCP errors
- Every operation has an
operationIdand asummary. Code generators get stable method names. Response descriptions say what each status means instead of "Default Response". - Shared error responses. Errors are described once, under
components/responsesandcomponents/schemas/Error, anderror.codeis an enum of every code the API sends. The common refusals (400, 401, 403, 404, 429 and 5xx) are listed on every operation they apply to. POST /uploaddocuments its multipart body: thefilepart and the optionaldocumentTypefield.- API key permissions are an enum in the API keys schema, so the scopes a key can hold are listed in the document.
- The document describes authentication, finding your tenant id, the error envelope, pagination, idempotency, webhook signatures and rate limits in its introduction, with examples for the core flow: submit an order, follow the envelope, approve it.
- Routes that are not for customers are no longer in the public document: platform-operator routes, the Stripe and Shopify webhook receivers, the mailbox push targets, and the token introspection endpoint the hosted MCP service calls. They were never callable with a tenant API key; nothing a customer could call was removed.
- MCP tool errors are structured. A refused call returns
{ code, message, details }as the tool result under the Poppelo name, instead of the raw HTTP text. Branch oncode. - MCP tool sets. Every tool is still offered by default, so existing clients see no change. To offer an agent only the core set (submit, status, review queue, approve and reject, reference data, and
whoami), setORDERFLOW_MCP_TOOLSETS=coreon a local server, or send theX-Poppelo-MCP-Toolsets: coreheader to an HTTP server. - Every MCP tool parameter has a description.
Add one customer, transfer ownership, forward mail and connect a mailbox
- New:
POST /reference-data/customersadds one reference customer by hand, without a file (admin,reference-data:write; MCP toolcreate-reference-customer). Domains are checked the same way as an import: a malformed or public-mailbox domain is400. A customer with the same name (ignoring case) or the same customer number as an active one is409 CONFLICT; a single add never overwrites. - New:
GET /golden-data/partnerslists the customers that have verified orders, as{ id, name, verifiedOrders }. - New MCP tool
transfer-ownershipover the existingPOST /users/:userId/transfer-ownership. Owner only, so an API key gets403. - A forwarding address and your own mailbox can be active together. Forwarded mail lands on the forwarding channel, and the mailbox is read on its own. A paused forwarding address now holds forwarded mail even when a mailbox is connected.
GET /channelsshowsintakeAddressonly on the channel forwarded mail is delivered to. POST /channelswithchannelType: "email"requiresimapHost,imapPort(1 to 65535),imapUserandimapPassword; otherwise400 VALIDATION_ERRORwithdetails.fieldErrors.viais set by Poppelo:POST /channelsrefuses it andPATCHkeeps the stored value.CHANNEL_EXISTSnow reads "You already have an active mailbox. Edit it, or turn it off before adding another."PATCH /tenants/:id/settingsrefuses email export delivery with a missing, blank or malformed address:400 VALIDATION_ERRORwithdetails.fieldErrors['exportConfig.delivery.email'].
API contract fixes before launch
- Autonomy grant needs a person.
POST /autonomy/customers/:id/grant(and thegrant-customer-autonomyMCP tool) answers403 AUTONOMY_GRANT_REQUIRES_PERSONto an API key; a signed-in admin, or a connected app acting for one, may grant. Revoke still works with an API key. A partner below the clean-streak bar (eligible: false) is refused with409 AUTONOMY_NOT_ELIGIBLE(details.cleanStreak,details.required) unless the body sendsoverride: truewith areasonof at least 10 characters (422 OVERRIDE_REASON_REQUIREDotherwise); an override grant is audited asautonomy.override_grantedand itsautonomy.grantedwebhook carriesoverride: true.grantedByis the person who granted. The MCP tool takesoverrideandreason. - Order approve refuses an unknown correction field.
POST /review/:envelopeId/approveanswers400 INVALID_CORRECTION_FIELD(details.field) when acorrections[].fieldis not a header field (customerName,poNumber,specialInstructions,deliveryDate,orderDate,requestedShipDate,shippingMethod,customerAccountNumber,shipToCode),shippingAddress.<line1|line2|city|state|zip|country>orlineItems[<line id or zero-based index>].<sku|description|quantity|unitPrice|uom|discount>. Nothing is changed, the other corrections in the request included; before, the field was dropped and the order approved and exported. POST /ordersrefuses an unknown top-level property with400 VALIDATION_ERROR(details[].pathsuch asbody.idempotency_key). Before, it was ignored, so a misspeltidempotencyKeylost its idempotency.- Status filters are validated.
GET /orders?status=(comma-separated) andGET /invoices?status=answer400 VALIDATION_ERRORfor a value that is not an envelope status; before, they answered an empty page.GET /orders?status=failedlists orders that were read, so a document that failed before an order was extracted is not in it; follow such a document withGET /envelopes/{envelopeId}. - Only the current plans can be bought.
POST /provision/signup,POST /provision/signup/session,POST /billing/checkoutandPOST /billing/change-planaccept onlystarter-2026,core-2026,growth-2026,scale-2026; the retiredcore,growthandscaleare400. Existing subscriptions on a retired plan are unchanged. - Webhook payloads.
actorTypeisapi_keywhen an API key made the decision (it saiduser); a person or a connected app acting for one isuser. Invoice events addinvoiceNumber,vendorNameandtotalAmount; on invoice eventspoNumber,customerNameandorderValuestill carry those values for one more release and are deprecated there.envelope.exportedno longer carriesstoragePath. - Public
GET /api/v1/health/statusnow answers only{ status, timestamp, components: [{ key, label, status }] }with the componentsorder-processinganddeliveries(ok,degraded,outage).statuskeeps its roll-up (ok,degraded,unavailable; 503 when unavailable), so a keyword check on"status":"ok"alerts on the same conditions as before. - New:
GET /api/v1/meand thewhoamiMCP tool: the caller'stenantId,principalType(api_key,user,oauth_app), andapiKey(id, name, permissions),user(id, live role) orconnectedApp(client id, name, scopes). Any valid credential; no scope needed. - API keys. The create response's
detailsaddstenantId,permissions(what was granted, the integration default when none were sent) andexpiresAt. AnexpiresAtin the past is400 VALIDATION_ERROR. A revoked key answers401 API_KEY_REVOKED(a wrong or unknown key is still401 UNAUTHORIZED). Settings › API keys shows a Permissions column. - Intake 202s add
statusUrl(/api/v1/tenants/{tenantId}/envelopes/{envelopeId}):POST /orders,POST /invoices,POST /uploadandPOST /upload/:envelopeId/reprocess, replays included.GET /orders/{id}andGET /invoices/{id}with an envelope id answer404 NOT_FOUNDwhose message says it is an envelope id, withdetails.envelopeId,details.statusUrland, once read,details.orderId/details.invoiceId. - Signup.
POST /provision/signupsends no email itself (the web page asks for the sign-in link). Its message now says so, and the 201 addsnext: { action: "sign_in", signInUrl, message }. Creating an intake channel without a plan is still402 SUBSCRIPTION_REQUIRED, now worded "Start a trial or subscription before adding inboxes." - Error envelope.
VALIDATION_ERROR.detailsis the documented[{ path, message, code }];pathreads likebody.corrections[0].field, andmessagenames the first offending field.correlationIdis always the request id and is on every error body. A wrong content type is415 UNSUPPORTED_MEDIA_TYPEand an oversize body413 PAYLOAD_TOO_LARGE; a malformed URL is400 BAD_REQUESTin the same envelope. - Empty bodies. A
DELETE, or aPOSTwhose body is optional (autonomy grant and revoke, webhook test and the like), acceptsContent-Type: application/jsonwith an empty body, and a missing body, as{}. - Webhooks on a development server. On a local development API only, a webhook subscription may point at a loopback or private host on any port. URL refusals are worded for the feature that checks them. A
webhook.testdelivery that fails is recorded and returned, never retried and not counted toward the subscription's failure streak. - Order timeline. An approval by API key reads "Approved via API key <name>"; "Validation complete" is listed before the routing step it led to.
Order totals, PO search and one match score
GET /ordersandGET /orders/exporttakepoNumber(PO number only) andq(PO number or customer name). Both are case-insensitive and match any part of the value;%and_are matched literally.GET /reviewtakes the same two parameters. The oldcustomerparameter still works.GET /orders/:orderIdadds totals:orderValue,linesTotal,charges[],chargesTotal,orderTotal,statedTotal(the total printed on the PO) andcustomerNumber, and each line addsdiscountandlineTotal.orderTotalis null when a line has no price; it is never estimated.- One match score.
GET /orders,GET /orders/:orderIdandGET /reviewaddmatchScore(4 decimal places) andmatchScorePercent(a whole percent, cut down, never rounded up: 0.949 is 94). It is the score routing decided on.confidenceScorekeeps its meaning.GET /envelopes/:envelopeIdroundsdecision.adjustedScoreto 4 decimal places. GET /ordersrows and the dashboard recent activity addexportFormat,exportDeliveredTo(for an emailed export) anddestinations.- The order timeline adds
actorName: the name (or email) of the person who acted, only for a user of your account. - Orders CSV export (
GET /orders/export): the first seven columns keep their names and places.orderDateis now the PO date as YYYY-MM-DD, falling back to the day it was received, andtotalAmountis to the cent. New columns are appended after the existing ones:poNumber,statusLabel,orderDateSource(poorreceived) andmatchScorePercent.statuskeeps the status code. - Exported order files (CSV and Excel default layout):
Ship Bynow holds the requested ship date. Appended columns:Charges,Charges Total,Order Total,Delivery Date,Customer Number, and the ship-to and bill-to address. Your own custom layouts are unchanged. GET /metrics:accuracy.approvedUnchangedRate,approvedUnchangedOrders,correctedOrdersandrejectedOrdersare added, and the four rates add up to 1. Received counts leave out documents that could not be read, which are reported asvolume.failedDocuments.
Claiming an order that already left review: NOT_REVIEWABLE
POST /review/:envelopeId/claimon an order that is no longer in review answers 409NOT_REVIEWABLE, witherror.details.status(for exampleapproved). Do not retry it: the order was already decided. A live lock held by someone else stays 409CONFLICT. Before this change both wereCONFLICT, so a client that treated every 409 as a lock should now handleNOT_REVIEWABLEtoo.POST /onboarding/guidedwithstep: "verify"acceptsdata.skippedTest(boolean) to record that the test step was skipped.
Review lock refusals name who holds the order
POST /review/:envelopeId/claimanswers 409CONFLICTwitherror.details { lockedBy, lockedByName, lockedSince, lockedUntil }when another reviewer holds the order.lockedByNameis the holder’s name or email (null when it cannot be read), andlockedUntilis when the lock frees on its own. All times are ISO 8601. Every field is null when there is no live lock.
ISO 8601 timestamps everywhere
- Every JSON response sends timestamps as ISO 8601 (RFC 3339), for example
2026-11-19T05:15:27.169797Z. Some fields used to arrive as database text such as2026-11-19 05:15:27.169797+00. The instant is unchanged and the fraction digits are kept, so a timestamp you send back as a cursor selects the same rows. Date-only fields stayYYYY-MM-DD. - The
webhook.disabledpayload (firstFailureAt,disabledAt) and the orders CSV export (orderDate,createdAt) use the same format. - The order and invoice detail responses declare
format: date-timeon their timestamp fields in the OpenAPI document.
MCP: connected apps and scoped tool sets
- MCP tools
list-connected-appsandrevoke-connected-app, overGET /oauth/grants(all,includeRevoked) andDELETE /oauth/grants/:grantId. An API key needsapi-keys:readorapi-keys:write. Revoking an already revoked grant succeeds; another account’s grant id is 404OAUTH_GRANT_NOT_FOUND. - Scoped tool sets (
X-OrderFlow-MCP-Scopes): eight reads that a connected app may not make are no longer in theorderflow:readset:get-partner-check,get-onboarding-status,get-order-acknowledgement-settings,get-queue-health,get-integration-status,get-netsuite-connector,get-custom-rest-connector,get-quickbooks-posting-options. They stay available to an unscoped API-key connection. - Signing in to a hosted MCP endpoint with your Poppelo account is not available yet. Contact support for MCP access.
Microsoft 365 admin approval and consent errors
POST /channels/microsoft365/admin-consent(admin,channels:write) and theget-microsoft365-admin-consent-linkMCP tool. Body{ returnTo?, directory? };directoryis the organization’s Microsoft tenant id or a domain, defaultorganizations. A browser session gets{ adminConsentUrl, directory, scopes }; an API key gets{ connectUrl, expiresAt, requiresSignedInAdmin: true, directory, scopes }, a one-time link a signed-in owner or admin opens. It connects nothing: connect the mailbox afterwards as usual. Errors: 400VALIDATION_ERROR, 503PROVIDER_NOT_CONFIGURED.- Microsoft 365 connect scopes add
https://graph.microsoft.com/User.Read, used only to read the mailbox’s own address. An existing connection keeps working; reconnect it once to pick the scope up. - Microsoft refusals redirect with
connect_error=admin_approval_required,app_not_in_directory,wrong_accountorconsent_cancelledinstead ofdenied. The matching error codes areMICROSOFT_ADMIN_APPROVAL_REQUIRED,MICROSOFT_APP_NOT_IN_DIRECTORY,MICROSOFT_ACCOUNT_NOT_SUPPORTEDandOAUTH_CONSENT_CANCELLED, orOAUTH_DENIED.
Home’s figures in GET /metrics
GET /metricsaddsvolume.sent30d(purchase orders sent on in the last 30 days),volume.linesRead30d,accuracy.autoApprovedOrders,processing.medianEndToEndMsandrecentActivity(the 5 most recent purchase orders, each withenvelopeId,orderId,poNumber,customerName,status,state,destinationsandreceivedAt). Supplier invoices are never counted.GET /dashboardcarries them too.GET /metrics/timeseries: each day addssent; a day with something sent and nothing received appears withorders: 0.
Download an exported invoice’s file
GET /invoices/:invoiceId/export-fileand theget-invoice-export-fileMCP tool: a 15-minute signed URL for the CSV file an invoice was exported to, withfilename,format,deliveredViaandexportedAt. 404NOT_FOUNDwhen the invoice has not been exported as a file.GET /invoices/:invoiceIdaddsexportFile({ filename, format, deliveredVia, exportedAt }, or null).- Intake
metadataonPOST /orders,/orders/bulk,/orders/manualand/invoices: a top-levelexportkey is reserved and dropped from what is stored. The request is not refused.
Move a "Handle myself" order back to review
POST /review/:envelopeId/return-to-reviewand thereturn-to-reviewMCP tool. Body{ reason?: string }. Moves an order a person put inmanual_handlingfrom review back toin_review, when nothing was ever sent to a destination. Refusals are 409NOT_IN_MANUAL_HANDLING,NOT_AN_ORDER,MANUAL_HANDLING_SYSTEM_HOLDorDESTINATION_ALREADY_ATTEMPTED, and 409CONFLICTwhile the order is busy. Operator role,review:write.- On success the order is checked again and
envelope.in_reviewfires withpreviousStatus: "manual_handling"andreason: "returned_to_review". GET /orders/:orderIdaddsreturnToReview({ eligible, refusalCode, destinationNames }) for an order inmanual_handling.
Re-check an order in review against the current catalog
POST /review/:envelopeId/rematchand therematch-review-orderMCP tool. Re-runs part matching on unmatched or uncertain lines, and customer matching when the customer is unresolved, then checks the order again. A line or customer a person decided is never changed. It never approves or routes. Refusals: 409INVALID_STATE,NOT_AN_ORDER,LOCKED; 404NOT_FOUND.GET /review/:envelopeIdaddsreferenceData.changedSinceExtraction.
Edit a customer’s sender domains and aliases
PATCH /reference-data/customers/:customerIdand theupdate-reference-customerMCP tool. Body{ senderDomains?: string[], aliases?: string[] }; each list given replaces the stored one. Domains are reduced to the bare host and lower-cased; a value that is not a domain, or a public mailbox provider such asgmail.com, is 400VALIDATION_ERRORwithdetails: { field, reason, value }. Needs an admin session orreference-data:write.
Approval refuses an order whose own data cannot post
POST /review/:envelopeId/approveanswers 409POSTING_BLOCKEDwhen the order’s own data cannot post to a QuickBooks or Shopify destination it is about to be sent to, for example a printed line total that is not quantity × price less discount. Nothing is approved.error.details.blockers[]says which destination and line. Correcting the line in the same approve clears it.- The approve response adds
postingCheck:passed,unavailableornot_applicable.
The trial report
GET /metrics/trial-reportand theget-trial-reportMCP tool:timeSavedOnReviewed,errorsCaught,goLive(progress toward automatic approval) andlines, the same content as sentences.
Pilot accuracy and measured review time
GET /metrics/pilotaddsanomalyImpact: how many orders would have been approved automatically with and without the per-customer anomaly rules. Routing is unchanged.- Review time is measured from the first claim to the decision. An approval by API key, without opening the order, or after more than 30 minutes is recorded as unmeasured, not 0.
POST /onboarding/guidedwithstep: "basics"requiresdata.minutesPerOrder(0 to 120) anddata.laborRatePerHour(0 to 1000) unless your account already set them; otherwise 400VALIDATION_ERROR.- No default baseline in time saved:
GET /metrics/trustandGET /summaryreport time saved as null until your account sets its baseline.
Processed-order billing and the 2026 plans
- Plans say what they bill in
billingUnit:processed(every purchase order approved) orauto_approved(only orders approved without a person, on retired plans). Rejected orders, manual handling and supplier invoices are free on both. - Plan slugs are
starter-2026,core-2026,growth-2026andscale-2026. A request naming a retired slug (core,growth,scale) gets the plan that replaced it. GET /billing,GET /billing/plansandGET /public/plansaddbillingUnitandincludedOrders;GET /billing/usageadds billable-order counts. Old fields are kept.
Validation error detail wording
- Unchanged: the status (400),
error.code(VALIDATION_ERROR), the response shape and every error code. - Changed: the text inside
error.details[]. For exampleinvalid_stringis nowinvalid_format. Branch onerror.code, never ondetails[]text. - Stricter input:
uuidfields require a valid version and variant, integers must be safe integers, numbers refuseInfinity, and date-times need seconds.
Webhook headers carry the Poppelo name
- Every delivery is signed with
X-Poppelo-Signature(hex HMAC-SHA256 of{timestamp}.{raw body}with your subscription secret) and carriesX-Poppelo-Timestamp(Unix seconds),X-Poppelo-EventandX-Poppelo-Delivery-Id(stable across retries: dedupe on it). - Deprecated:
X-OrderFlow-Signature,X-OrderFlow-Timestamp,X-OrderFlow-EventandX-OrderFlow-Delivery-Idare still sent alongside with the same values for one more release, then no longer sent. Switch your verifier to theX-Poppelo-*names. - Human decisions fire webhooks:
envelope.approved,envelope.rejectedandenvelope.manual_handling, with every envelope event built from one payload shape.