Sending a document PDF to Trendyol is done with a customizable / general-use button on Sales/Purchases, using the #PST command. The call goes through the EMDI–Trendyol bridge on sbzsystems.com, which uploads the file to the Trendyol API.
For the general button setup and available variables, see: Customizable button on Sales/Purchases.
Sending an invoice to Trendyol
You need either the Trendyol order number (orderNumber) or the shipment package id in the bridge URL. Use your bridge shop code in shop and the installation API token in key (same values as in the Trendyol bridge settings).
- With a direct EMDI–Trendyol bridge, the order number is usually in #REL. Use:
|
1 |
#PST|https://www.sbzsystems.com/apps/emdi/trendyol.php?shop=SHOP&key=TOKEN&action=uploadinvoice&orderid=#REL|invoice_file=#PDF|||ok|| |
where SHOP is the shop code, TOKEN is the bridge key, and #REL is the Trendyol order number. The bridge resolves the package from orderNumber and uploads the PDF.
The same pattern applies when the Trendyol order number exists alone in a field mapped to #REL (or otherwise passed as orderid).
- Using the package id from a custom field: the Trendyol bridge stores the shipment package id in custom field 1 (#CU1). Alternatively:
|
1 |
#PST|https://www.sbzsystems.com/apps/emdi/trendyol.php?shop=SHOP&key=TOKEN&action=uploadinvoice&packageid=#CU1|invoice_file=#PDF|||ok|| |
where #CU1 is the order’s package id.
- Without a direct bridge, if the order number is only in the notes (#SXO) and is alone in that field:
|
1 |
#PST|https://www.sbzsystems.com/apps/emdi/trendyol.php?shop=SHOP&key=TOKEN&action=uploadinvoice&orderid=#SXO|invoice_file=#PDF|||ok|| |
If the notes also contain other text, isolate the order number with start/end markers at the end of the #PST command (fields 6 and 7):
|
1 |
#PST|https://www.sbzsystems.com/apps/emdi/trendyol.php?shop=SHOP&key=TOKEN&action=uploadinvoice&orderid=#SXO|invoice_file=#PDF|||ok|:|: |
Notes example:
|
1 |
TRENDYOL ORDER :101589: |
Notes
- File parameter:
invoice_file=#PDF(PDF / PNG / JPG supported). - Success response text:
ok(as returned by the bridge). - Leave Headers empty — authentication uses the bridge
key, not a Bearer header like Skroutz. - Replace
SHOPandTOKENwith your real shop values.
