Przejdź do głównej zawartości

Dodaj dynamiczny załącznik do szablonu

PUT
/api/v3/Templates/{templateId}/dynamic-attachments/{filename}/{type}
curl --request PUT \
--url https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v3/Templates/1/dynamic-attachments/example/Invoice \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "additionalFieldName": "example", "attachmentTemplateId": 1 }'

Dołącza do wiadomości plik generowany dynamicznie (np. z pola dodatkowego zamówienia).

templateId
wymagane
integer format: int64
filename
wymagane
string
type
wymagane
string
Dozwolone wartości: Invoice NewestShipmentLabel OrderAdditionalField LineItemProductComplexField LineItemAdditionalField CsvTemplate PdfTemplate AllInvoices
object
additionalFieldName
string
nullable
attachmentTemplateId
integer format: int64
nullable
Examplegenerated
{
"additionalFieldName": "example",
"attachmentTemplateId": 1
}

Success

object
id
integer format: int64
templateId
integer format: int64
name
string
nullable
blobKey
string
nullable
contentType
string
nullable
type
string
Dozwolone wartości: Invoice NewestShipmentLabel OrderAdditionalField LineItemProductComplexField LineItemAdditionalField CsvTemplate PdfTemplate AllInvoices
additionalFieldName
string
nullable
attachmentTemplateId
integer format: int64
nullable

Bad Request

object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
key
additional properties

Server Error