Dodaj załącznik do szablonu wiadomości
PUT
/api/v3/Templates/{templateId}/attachments/{filename}
const url = 'https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v3/Templates/1/attachments/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/octet-stream'}, body: 'example'};
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/attachments/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/octet-stream' \ --data exampleWgrywa plik, który będzie dołączany do wiadomości wysyłanych z szablonu.
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
Treść żądania
Dział zatytułowany „Treść żądania”Typ treściapplication/octet-stream
string format: byte
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

