@lonca/hepsiburada 1.4.0
Minor
View on npm →Typed fields for what Hepsiburada sends on order lines and packages beyond its spec (found by the 2026-10-27 drift run; checked read-only on prod and on SIT):
Order(the rows oforders.list()and the other line feeds) gainsdeci(volumetric weight of one unit),totalDeci(deci×quantity) andhasInvoice(trueonce an invoice link was sent for the line's package).ShippingPackagegainstotalDeci(the sum of its lines'deci×quantity) andwarehouse({ shippingAddressLabel, shippingModel }, the newPackageWarehousetype) fromorders.listPackages(), andhasInvoicefrom theHasInvoiceof the delivered list.
Types and inputs for the open findings of the Hepsiburada SIT run (#270), checked on SIT on 2026-10-27:
shipping.getCargoFirms()returns one row per cargo firm:idandnamecome from the nestedcargoFirmId/cargoFirmName, and the newlabelId,labelNameandlabelDisplayNametell which label (LowDeci,HighDeci,SpecialDelivery, …) it is listed under. The rows were label groups, soidandnamewere always empty; code that readraw.cargoFirmsshould read the rows themselves now (rawis the firm entry).codeis deprecated: Hepsiburada sends no code here.orders.getPackageLabel(packageNumber, { format })takes the output format (zpl,base64zpl,pdf,png,jpg), andPackageLabelgains the spec'sdataandhasMerchantMutualBarcode.urlandbase64are deprecated; they are not in Hepsiburada'sBarcodeData. SIT could not produce a label (shared labels are for HepsiJet and Aras, and stub packages have no delivery record), so the response shape follows the spec only.- The date fields of
orders.markPackageInTransit()/markPackageDelivered()/markPackageUndelivered()take aDateas well as a string; aDateis sent as an RFC 3339 string. The newPackageStatusDatetype documents the string form Hepsiburada accepts (RFC 3339 with a zone,…Zor…+03:00;yyyy-MM-dd HH:mmandyyyy-MM-ddare refused). UndeliveredReasonhintsCustomerUnreachable, the oneundeliveredReasonvalue SIT accepts; Hepsiburada publishes no list.ClaimActionInputtypes the documented bodies of the claim actions:FinalizedWith,AcceptionReason,InvoiceLink(accept),ClaimRejectionReason,MerchantStatement,Reports,UploadedReportsUrls(reject) andpreApprovalReason(pre-approval).reasonCodeandconfirmedare deprecated; Hepsiburada reads neither.CreateClaimInputtypestype,reasonandnewSKU;linesis deprecated.
Claim and invoice fixes from the Hepsiburada SIT run (#270), checked on SIT on 2026-10-27:
claims.preApprovalConfirm()sendspreApprovalReason: 'ProductInvestigation'when the input has none. It is the only value Hepsiburada accepts (400 "PreApprovalReason must be ProductInvestigation"), and without it every call was refused with400 "PreApprovalReason cannot be empty", including the README's{ confirmed: true }example. A reason you pass is sent unchanged.claims.reject()throws aValidationErrorfor an empty body before sending it; Hepsiburada refuses one with a bare400. A reject withMerchantStatementwas accepted; send it with aClaimRejectionReasonfrom Hepsiburada's list.claims.create()throws aValidationError(status200, the body onerror.data.body) when Hepsiburada reports a failed create inside a200: the failure text ("Claim oluşturulamadı.") sat where the claim number belongs, and the call resolved as if the claim had been created.- Docs:
orders.sendInvoiceLink()works with the plaininvoiceLinkform when the link is served asapplication/pdfortext/html; Hepsiburada downloads it and refuses any other content type (400code2003), even withcontentTypeset.invoices[]entries need theirorderNumber. The README and the guide use the documented claim, status and invoice bodies.