API
Türkçe

API reference · Orders

Save the e-invoice link

Saves an order's e-invoice data and link, and can also send the link to the marketplace.

POST https://out.stockmount.com/api/Integration/SetEinvoiceLink
Changes data

The order is found by store and marketplace order number (IntegrationOrderCode). With IntegrationOrderDetailIds only those marketplace line IDs are updated; otherwise all lines of the order. If the order number is not found in the store given by StoreId, you get Invalid order.; an order with the same number in another store is never updated.

Updated lines get the invoice number, invoice UUID, scenario, link and invoice date, and are marked as invoiced.

With SendEinvoiceToPlatform true the link is also sent to the marketplace. This is supported only for Trendyol, Hepsiburada, N11 and Pazarama stores. If sending fails the link is still saved, but Result is false and ErrorMessage is Invoice link saved successfully. Invoice link could not be sent: … (the rest is usually a Turkish marketplace/system message).

On success Message is Invoice link saved successfully. or Invoice link saved and sent successfully.; Response is empty.

Missing fields are reported together: 00003 with ErrorMessage like Missing: StoreId, InvoiceNumber, …. Send InvoiceTime in Turkey time without an offset.

Request fields

Field Type Description
ApiCode required string API code returned by DoLogin.
StoreId required integer Store ID.
IntegrationOrderCode required string Marketplace order number.
IntegrationOrderDetailIds string[] Optional marketplace line IDs. Empty means all lines.
InvoiceNumber required string Invoice number (e.g. ABC2026000000123).
InvoiceId required string Invoice UUID (ETTN).
InvoiceScenario required string Invoice scenario (e.g. EARSIVFATURA, TEMELFATURA). Not validated; stored as is.
InvoiceTime required datetime Invoice date, Turkey time without offset.
InvoiceLink required string Public link to the invoice (PDF/HTML).
SendEinvoiceToPlatform boolean When true the link is also sent to the marketplace. Default false.

Response fields (Response)

On success the Response field is empty; read the outcome from Result.

Error codes for this endpoint

CodeWhen
10001 StoreId is not a store in your account (ErrorMessage: Invalid store.).
99999 Order not found or no line updated (Invoice link could not be saved. Something went wrong.), sending the link to the marketplace failed, or an unexpected error.

For session errors (00001, 00006) and every other code see error codes.

Related endpoints

Example request

{
  "ApiCode": "API_CODE",
  "StoreId": 12345,
  "IntegrationOrderCode": "10293847",
  "InvoiceNumber": "ABC2026000000123",
  "InvoiceId": "3f2a9c1e-7b4d-4e8a-9c21-5d6e7f8a9b0c",
  "InvoiceScenario": "EARSIVFATURA",
  "InvoiceTime": "2026-11-05T15:00:00",
  "InvoiceLink": "https://efatura.example.com/view/3f2a9c1e-7b4d-4e8a-9c21-5d6e7f8a9b0c.pdf",
  "SendEinvoiceToPlatform": true
}

Example response

{
  "Result": true,
  "Message": "Invoice link saved and sent successfully."
}

Try it

The request goes straight from your browser to out.stockmount.com. The ApiCode is not stored by this site; it is kept only while this tab is open.

Get an ApiCode before sending requests.

This endpoint changes real data in your account.

Use ↑ ↓ to move, Enter to open, Esc to close.

Connect to the Out API

DoLogin is called and the returned ApiCode is kept in this tab. Your API password is never sent to this site.