Dodaj dynamiczny załącznik do szablonu
PUT
/api/v3/Templates/{templateId}/dynamic-attachments/{filename}/{type}
const url = 'https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v3/Templates/1/dynamic-attachments/example/Invoice';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"additionalFieldName":"example","attachmentTemplateId":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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).
Autoryzacja
Dział zatytułowany „Autoryzacja”Parametry
Dział zatytułowany „Parametry”Parametry ścieżki
Dział zatytułowany „Parametry ścieżki”templateId
wymagane
integer format: int64
filename
wymagane
string
type
wymagane
string
Treść żądania
Dział zatytułowany „Treść żądania”object
additionalFieldName
string
attachmentTemplateId
integer format: int64
Examplegenerated
{ "additionalFieldName": "example", "attachmentTemplateId": 1}object
additionalFieldName
string
attachmentTemplateId
integer format: int64
Examplegenerated
{ "additionalFieldName": "example", "attachmentTemplateId": 1}object
additionalFieldName
string
attachmentTemplateId
integer format: int64
Examplegenerated
{ "additionalFieldName": "example", "attachmentTemplateId": 1}Odpowiedzi
Dział zatytułowany „Odpowiedzi”Success
object
id
integer format: int64
templateId
integer format: int64
name
string
blobKey
string
contentType
string
type
string
additionalFieldName
string
attachmentTemplateId
integer format: int64
object
id
integer format: int64
templateId
integer format: int64
name
string
blobKey
string
contentType
string
type
string
additionalFieldName
string
attachmentTemplateId
integer format: int64
Example
{ "type": "Invoice"}object
id
integer format: int64
templateId
integer format: int64
name
string
blobKey
string
contentType
string
type
string
additionalFieldName
string
attachmentTemplateId
integer format: int64
Example
{ "type": "Invoice"}object
id
integer format: int64
templateId
integer format: int64
name
string
blobKey
string
contentType
string
type
string
additionalFieldName
string
attachmentTemplateId
integer format: int64
object
id
integer format: int64
templateId
integer format: int64
name
string
blobKey
string
contentType
string
type
string
additionalFieldName
string
attachmentTemplateId
integer format: int64
Bad Request
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Server Error

