Release notes

Every release of the @lonca packages, newest first: since 1.0 for stable packages, since the first release for beta packages that have not reached 1.0. The packages follow semantic versioning: breaking changes only ship in a major version, or in a minor one for a beta (0.x) package.

Versioning policy →

@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 of orders.list() and the other line feeds) gains deci (volumetric weight of one unit), totalDeci (deci × quantity) and hasInvoice (true once an invoice link was sent for the line's package).
  • ShippingPackage gains totalDeci (the sum of its lines' deci × quantity) and warehouse ({ shippingAddressLabel, shippingModel }, the new PackageWarehouse type) from orders.listPackages(), and hasInvoice from the HasInvoice of the delivered list.
#279

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: id and name come from the nested cargoFirmId / cargoFirmName, and the new labelId, labelName and labelDisplayName tell which label (LowDeci, HighDeci, SpecialDelivery, …) it is listed under. The rows were label groups, so id and name were always empty; code that read raw.cargoFirms should read the rows themselves now (raw is the firm entry). code is deprecated: Hepsiburada sends no code here.
  • orders.getPackageLabel(packageNumber, { format }) takes the output format (zpl, base64zpl, pdf, png, jpg), and PackageLabel gains the spec's data and hasMerchantMutualBarcode. url and base64 are deprecated; they are not in Hepsiburada's BarcodeData. 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 a Date as well as a string; a Date is sent as an RFC 3339 string. The new PackageStatusDate type documents the string form Hepsiburada accepts (RFC 3339 with a zone, …Z or …+03:00; yyyy-MM-dd HH:mm and yyyy-MM-dd are refused).
  • UndeliveredReason hints CustomerUnreachable, the one undeliveredReason value SIT accepts; Hepsiburada publishes no list.
  • ClaimActionInput types the documented bodies of the claim actions: FinalizedWith, AcceptionReason, InvoiceLink (accept), ClaimRejectionReason, MerchantStatement, Reports, UploadedReportsUrls (reject) and preApprovalReason (pre-approval). reasonCode and confirmed are deprecated; Hepsiburada reads neither. CreateClaimInput types type, reason and newSKU; lines is deprecated.
#276

Claim and invoice fixes from the Hepsiburada SIT run (#270), checked on SIT on 2026-10-27:

  • claims.preApprovalConfirm() sends preApprovalReason: '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 with 400 "PreApprovalReason cannot be empty", including the README's { confirmed: true } example. A reason you pass is sent unchanged.
  • claims.reject() throws a ValidationError for an empty body before sending it; Hepsiburada refuses one with a bare 400. A reject with MerchantStatement was accepted; send it with a ClaimRejectionReason from Hepsiburada's list.
  • claims.create() throws a ValidationError (status 200, the body on error.data.body) when Hepsiburada reports a failed create inside a 200: 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 plain invoiceLink form when the link is served as application/pdf or text/html; Hepsiburada downloads it and refuses any other content type (400 code 2003), even with contentType set. invoices[] entries need their orderNumber. The README and the guide use the documented claim, status and invoice bodies.
#276

@lonca/n11 1.0.0

Major

View on npm →

@lonca/n11 1.0.0: the n11 SDK leaves beta. The public API is the same as the last 0.x release, so no code changes are needed; from now on breaking changes ship only in major versions (see Stability & versioning). Every method has run against n11: the reads on a live seller account, the writes on n11's test store, with order writes, the collection request and return decisions on real test orders.

#259

claims.denyReturn() always sends returnShipmentType, shipmentCompanyId, trackingNumber and deliveryReceiptNumber, as empty elements when unset. n11 refused a CAMPAIGN denial without them ("trackingNumber alanı geçersizdir"), although its docs say to leave them empty; with the empty elements it was accepted (test store, 2026-10-16). Docs: claims.listReturns() lists a REQUESTED claim only once its return shipment has reached the seller.

#257

@lonca/trendyol 1.3.0

Minor

View on npm →

Fixes and additions from an end-to-end run of every method on Trendyol stage (2026-10-14):

  • claims.list() returns an empty page when nothing matches; Trendyol answers that case with 404 order.not.found, which was thrown as NotFoundError. It also takes the documented orderNumber and claimIds filters.
  • claims.create() takes shipmentCompanyId (Trendyol refuses a claim without it, "ShipmentCompanyId: 0 hatalıdır"; 17 is Trendyol Express) and resolves to { claimId, claimItemIds, cargoTrackingNumber, raw }.
  • testOrders.setClaimsWaitingInAction() sends the sellerID header; stage refused it without one.
  • inventory.updateAndWait() / pollBatchStatus() wait for every item of the batch: a product-create batch read COMPLETED a few seconds before its item result appeared, so a wait could return without the per-item outcome. A batch that is still COMPLETED with missing items at the timeout is returned instead of thrown.
  • Docs: claims.createIssue() needs at least one file in practice; products.updateUnapproved() needs the full product.
#245

@lonca/trendyol 1.2.5

Patch

View on npm →

inventory.updateAndWait() and pollBatchStatus() treat a batch as done once every one of its itemCount items is SUCCESS or FAILED, not only when the batch status reads COMPLETED / FAILED. On Trendyol stage a stock-and-price batch kept the status PROCESSING for good although its item was SUCCESS and the stock had changed (2026-10-14), so updateAndWait waited for the full timeout and threw TimeoutError. The check is exported as isBatchSettled(result).

#240

@lonca/trendyol 1.2.4

Patch

View on npm →

Checked on Trendyol stage with test orders (2026-10-14). HTTP 400 and 422 answers (Trendyol's business rules, TrendyolBusinessException) are now a ValidationError whose message carries Trendyol's first message, e.g. Trendyol rejected the request (400): Fatura numarası hatalıdır…; they were a generic LoncaError with code UNKNOWN and the message Trendyol unexpected response (400). Docs: testOrders.updateStatus(id, status) without lines works (stage moved the package), and SendInvoiceLinkInput.invoiceNumber takes the LON2026000000001 shape.

#237

@lonca/trendyol 1.2.3

Patch

View on npm →

Request fixes found by the new request check (pnpm drift:requests), against Trendyol's references:

  • exportCenter.updateStocks() sends { stocks: [...] }, the body "autoft-update-stocks" requires. It sent { items: [...] }, a key the endpoint does not know.
  • testOrders.create() and testOrders.updateStatus() send the sellerID header both references require (createTestOrder has no seller id in its path at all).
  • Docs: updateStatus needs options.lines (the two-argument form stays for compatibility but sends a body the reference does not allow); the Export Center price and stock row fields are { barcode, buyingPrice, rrp? } and { barcode, stock }; the README's videos.create input is { title, videoUrl, productContentIds }.
#230

@lonca/hepsiburada 1.3.5

Patch

View on npm →

Fixes found by an end-to-end run against Hepsiburada SIT:

  • claims.list() / listByStatus() fill claimNumber and createdAt from the wire's number and claimDate; they were always empty, so claims.accept(claim.claimNumber) could not be called.
  • orders.listShippedPackages() / listDeliveredPackages() / listUndeliveredPackages() read the PascalCase PackageNumber / OrderNumber these lists send.
  • orders.getPackage() reads the one-element array the endpoint returns; every field was empty before.
  • orders.getChangeableCargoCompaniesFor*() fill code (the short name update*CargoCompany takes) and name from the wire's ShortName / Name.
  • categories.getAttributeValues() reads the bare [{ id, value }] array the endpoint returns instead of throwing request rejected (code=0), and maps value to name.
  • shipping.createProfile() / updateProfile() send the merchant id in the body (Hepsiburada answered 403 Auth Error without it); ShippingProfileInput gains id and name (the stored field; profileName is deprecated, Hepsiburada ignores it) and listProfiles() fills profileName from name.
  • A 403 "MerchantHasNoLine" (an order number the merchant does not have) is a NotFoundError, not an AuthError.
  • UploadStatus includes InProgress, which uploads report between Ready and Done; poll while it is Ready or InProgress.
#244

@lonca/hepsiburada 1.3.4

Patch

View on npm →

UploadStatus lists the values Hepsiburada actually returns for listing uploads: Ready while the upload is queued and Done once it is applied (stock and price uploads on SIT, 2026-10-14: Ready right away, Done seconds later, the listing changing only then). The README and the 30-minute guide told callers to poll while the status is PROCESSING, a value Hepsiburada never sends, so that loop stopped at Ready before the change had landed; they now poll while it is Ready. The old upper-case values stay in the type for compatibility.

#241

@lonca/hepsiburada 1.3.3

Patch

View on npm →

catalog.deleteByMerchantSkuList() sends the array of { merchant, merchantSku } Hepsiburada documents, filling in merchant from the client. It sent { merchantSkuList: [...] }, which Hepsiburada answers with a 500 (verified on SIT, 2026-10-14), so the method never worked. The older input is still accepted and converted, so existing calls now work as written.

#235

@lonca/hepsiburada 1.3.2

Patch

View on npm →

The order write input types and README examples now use the field names Hepsiburada reads, checked on SIT with test orders (2026-10-14). The SDK forwards these bodies unchanged, so code that already sends the right fields is unaffected; code that followed the old hints never worked:

  • createPackages: lineItemRequests: [{ id, quantity }] (a lineItems list → 400 "Line items empty or null").
  • updateLineItemCargoCompany / updatePackageCargoCompany: CargoCompanyShortName (a cargoCompany field → 400 CargoCompanyNotFound).
  • markPackageUndelivered: undeliveredReason + undeliveredDate (a reason field → 400 "incorrect undeliveredReason value"); the in-transit and delivered fields are typed too.
  • splitPackage: packageDetails / cancelledItems; cancelLineItem: reasonId (both per the spec; SIT could not get past its own package lookup to confirm).
  • The order and package lists send begindate / enddate as documented, and beginDate / endDate are documented as yyyy-MM-dd HH:mm: other formats are not rejected, the list just comes back empty.
#233

@lonca/hepsiburada 1.3.1

Patch

View on npm →

The order lists (orders.list, listCancelled, listPaymentAwaiting, …) always send offset and limit now, defaulting to 0 and 100. Called without them, Hepsiburada answers 400 "limit and offset parameters are required" (verified on SIT, 2026-10-14), so a bare orders.list() failed although the docs promised a default of 100.

#231

@lonca/hepsiburada 1.3.0

Minor

View on npm →

catalog.uploadProductViaFile() and questions.answer() now send multipart/form-data, as Hepsiburada documents them. Both sent a JSON body before, which Hepsiburada refuses (the upload with a 500, the answer with a 422 "Bu alan geçersizdir"), so neither worked; verified on SIT, 2026-10-14.

  • catalog.uploadProductViaFile() sends the products as a JSON file in the file part, fills in merchant from the client when a row has none, and rejects a row without categoryId or attributes.merchantSku before sending. Rows are typed as the new CatalogUploadProduct; UploadProductsInput still compiles but is deprecated. The upload receipt now reads the trackingId from the data envelope the endpoint answers with (it came back empty before), and getProductStatus() also returns success and code.
  • questions.answer() sends the Answer and Files parts (files as Blob / File), checks the answer is 1–2000 characters, and accepts the lower-case answer key the README used to show.
#226

productUpdates.importUpdates() now sends the batch the way Hepsiburada takes it: a { merchantId, items } JSON file in the multipart field file. It used to send the rows as a JSON body, which Hepsiburada answers with a 500, so the method never worked (verified on SIT, 2026-10-14; fixes #220). Rows are typed as the new ProductUpdateItem (hbSku, productName, productDescription, image1–image10, video, attributes) and a row without hbSku is rejected before sending; ProductUpdateInput still compiles but is deprecated. getUpdateStatus() also returns success and code (e.g. 4009 "Variant is not found."), and getUpdateHistory() rows carry createdAt. The fake client now hands a multipart body to the handler as its FormData.

#224

@lonca/hepsiburada 1.2.2

Patch

View on npm →

productUpdates.getUpdateStatus() and catalog.getTrackingIdHistory() now read rows from the data array of Hepsiburada's response envelope ({ success, code, message, data: [...] }). Both used to look only for a bare array, rows or items, so for a response in the documented shape getUpdateStatus() left rows unset (the rows were only on raw) and getTrackingIdHistory() returned an empty list.

#219

@lonca/trendyol 1.2.2

Patch

View on npm →

ShipmentPackage.whoPays is deprecated. The field is not in Trendyol's documentation and does not appear in production order data. It is still passed through when Trendyol sends it, and will be removed in the next major version.

#193

@lonca/trendyol 1.2.0

Minor

View on npm →

Map the fields Trendyol actually sends for locations, supplier addresses and category attributes, checked against the docs and the prod wire baseline (2026-10-10). Fields the SDK used to read but that neither the docs nor prod ever carry stay on the public types, now @deprecated (no type was removed or narrowed).

  • Neighborhood.postCode (new): the neighborhood's postal code, present on prod neighborhood rows (not in the docs). Neighborhood.code is deprecated (neighborhood rows have no code; it always equals id) and Neighborhood.districtCode is deprecated (always undefined).
  • District.cityCode is deprecated: district rows carry no city reference, so it was always undefined. District.code keeps reading the wire code.
  • SupplierAddress gains fullAddress, country, cityCode and districtId (documented and present on prod). SupplierAddress.name and fullName are deprecated (Trendyol sends neither; use fullAddress).
  • suppliers.getAddresses() now upper-cases addressType before matching, so the documented Shipment / Invoice / Returning values map to SHIPMENT / INVOICE / RETURNING. Before, mixed-case values fell back to SHIPMENT.
  • CategoryAttribute.values is deprecated and always []: getAttributes has no inline value list (no attributeValues in the docs or on prod). Use categories.getAttributeValues(categoryId, attributeId).
#171

@lonca/trendyol 1.1.0

Minor

View on npm →

createTrendyolClient and createHepsiburadaClient accept an optional fetch implementation (e.g. to add a proxy agent, or to record or mock traffic). It defaults to the global fetch, so existing code is unaffected.

#163

Fix brands.list pagination: paginate((p) => client.brands.list(p)) used to stop after the first page, because the SDK waited for a totalPages field that Trendyol never sends. When the response has no page count, a full page now sets nextCursor (a short page is the last one); a totalPages value is still honoured if present.

  • Brand gains an optional luxe flag (Trendyol's luxury-brand marker, present on prod brand rows), on both brands.list and brands.search.
  • City.countryCode is now filled with the country of the lookup ('TR', 'AZ', or the getCitiesByCountry argument). Trendyol's city rows have no country field, so it was always undefined before.
#167

@lonca/hepsiburada 1.2.0

Minor

View on npm →

questions.list() / questions.get() now expose the fields Hepsiburada actually returns (the documented IssueViewModel, verified on SIT): issueNumber, subject, lastContent, conversations (the question thread, including answers), product (sku, name, imageUrl, stockCode), customerId, orderNumber, lineItemId, createdAt, lastModifiedAt, expireDate and didCustomerSeeTheMessage. New exported types: QuestionConversation, QuestionProduct, QuestionSubject.

Deprecated: number, productSku and createdDate were never sent by Hepsiburada — they are now filled from issueNumber, product.sku and createdAt; use those instead. text and answer have no single equivalent (read conversations) and stay unset unless a response carries them.

#174

@lonca/hepsiburada 1.1.0

Minor

View on npm →

createTrendyolClient and createHepsiburadaClient accept an optional fetch implementation (e.g. to add a proxy agent, or to record or mock traffic). It defaults to the global fetch, so existing code is unaffected.

#163

Typed fields now match what Hepsiburada actually returns (checked against the portal specs and real production responses). Several fields that were typed before could never be filled in. The data was only available on raw.

  • accounting.listTransactions(): AccountingTransaction gains id, transactionType, transactionTypeCategory, status, sku, productName, quantity, merchantId, orderItemNumber, packageNumber, invoiceNumber, invoiceExplanation, isInvoice, isIncome, orderDate, invoiceDate, dueDate, and the money objects transactionAmount (the API's amount), taxAmount and netAmount. Each is a { value, currencyCode } object (new AccountingAmount type). The legacy transactionId, type, amount and currency fields are now filled from id, transactionType, amount.value and amount.currencyCode. They are deprecated, together with transactionDate, which Hepsiburada never sends.
  • orders.list*() / getByOrderNumber(): Order gains id (line item id), orderId, orderDate, lastStatusUpdateDate, dueDate, packageNumber, sku, merchantSku, barcode, name, quantity, cargoCompany, customerId, vat, vatRate, and the { amount, currency } prices unitPrice and totalPrice (new OrderPrice type). externalOrderNumber, modifiedDate and total are deprecated because Hepsiburada never sends them. createdDate is still filled by getByOrderNumber() only.
  • catalog.listProducts() / listProductsByStatus(): CatalogProduct gains the fields each endpoint really returns: barcode, hbSku, variantGroupId, price, tax, baseAttributes / productAttributes / variantTypeAttributes, validationResults and rejectReasons from listProducts(), and productStatus, taskDetails, matchedHbProductInfo, rejectReasonsMessages and videoStatus from listProductsByStatus(), where status is now filled from productStatus too. New types: CatalogProductAttribute, CatalogAttributePair, CatalogValidationResult, CatalogTaskDetail and CatalogMatchedHbProduct. These 15 fields are deprecated because neither endpoint sends them: id, createdAt, createdBy, modifiedAt, modifiedBy, preMatchedSku, siblingSku, listingStatus, listingFailureReason, validationStatus, productType, uploadDate, productQuality, categoryScore and fields.
  • categories.getAttributes(): CategoryAttribute gains type and multiValue. externalName and values are deprecated because they are never sent. Use categories.getAttributeValues() to get allowed values.

Nothing is removed or narrowed. Deprecated fields stay in place until the next major.

#168

@lonca/core 1.1.0

Minor

View on npm →

createRequester accepts a rawBody string that is sent exactly as given (e.g. a SOAP envelope), taking precedence over the JSON-serialised body. Set the matching Content-Type through headers.

#179

@lonca/trendyol 1.0.1

Patch

View on npm →

videos.list() now reads rows from the documented { meta, data: [...] } response envelope; previously it returned [] for that shape. SellerIntegrationStatus now lists the documented values IN_PROGRESS | SUCCESS | FAILED (it remains an open union, so other strings still type-check).

#158

@lonca/trendyol 1.0.0

Major

View on npm →

First stable release. The public API is identical to the previous minor — upgrading requires no code changes. From 1.0.0 on, @lonca/trendyol follows the stability policy documented at /stability/: breaking changes only in major versions, deprecations announced at least two minors before removal, and the exported API surface is locked in CI.

Verified read-only against the production API (seller account, 2026-08-30): all nine contract probes — products, orders, categories, brands, locations, questions, claims, finance settlements, and webhooks — answer 200 with the snapshotted shapes.

One behavioural fix is folded in: webhooks.* now calls Trendyol's documented /integration/webhook/sellers/{sellerId}/webhooks path. The previous /integration/sellers/{sellerId}/webhooks path is not routed on production (the gateway answers a host-level 556); the documented path answers 200. Verified live on production for webhooks.list().

#139

Dependency updated: @lonca/core 1.0.1

@lonca/hepsiburada 1.0.0

Major

View on npm →

First stable release. The public API is identical to the previous minor — upgrading requires no code changes. From 1.0.0 on, @lonca/hepsiburada follows the stability policy documented at /stability/: breaking changes only in major versions, deprecations announced at least two minors before removal, and the exported API surface is locked in CI.

Verified read-only against the production API (merchant account, 2026-08-30): all twelve contract probes answer 200, including catalog.listProductsByStatus (the pre-0.13.0 bare-500 regression stays fixed on production) and the per-service host routing — mpfinance, asktoseller, diskonto, mpop, and supplier-api all resolve and answer route-level JSON on their dedicated production hostnames.

#139

Dependency updated: @lonca/core 1.0.1

@lonca/core 1.0.1

Patch

View on npm →

README: replace the stale "0.x — alpha" stability note with the 1.x stable policy wording (the package has been 1.0 since the previous release).

#139

@lonca/core 1.0.0

Major

View on npm →

First stable release. The public API is identical to 0.7.0 — upgrading requires no code changes. From 1.0.0 on, @lonca/core follows the stability policy documented at /stability/: breaking changes only in major versions, deprecations announced at least two minors before removal, and the exported API surface is locked in CI. The five documented transport behaviours (raw-text fallback of safeJson, abort-reason bubbling during retry backoff, non-positive Retry-After being ignored, GET bodies being discarded, and FormData dropping a caller Content-Type) are part of the documented contract.

#136

Fix TypeScript type resolution for CommonJS consumers ("Masquerading as ESM"): the exports maps now declare per-condition types (import resolves dist/index.d.ts, require resolves dist/index.d.cts, including the SDKs' ./testing subpath). Runtime behaviour is unchanged; publint and arethetypeswrong now verify the packages in CI.

#136

Notes for the 0.x releases of the stable packages live in their CHANGELOG: @lonca/trendyol · @lonca/hepsiburada · @lonca/n11 · @lonca/core