Sankhya icon

Sankhya

Integração completa com o ERP Sankhya — REST v1/v2 e Gateway

Actions137

Movimentos / CACSP (Gateway) → Salvar Anexo

AI-generated

Summary

Upload and attach a file as an attachment to a specified record in the Sankhya system via the Gateway service.

Inputs

  • pkEntity (required) — Primary key of the record to which the attachment will be linked (e.g., NUNOTA=1234).
  • keySession (required) — Session key for authorization or identification in the Gateway service.
  • nameEntity (required) — Internal name of the entity in Sankhya (e.g., CabecalhoNota).
  • nameAttach (required) — Name of the attachment file to be saved.
  • description — Description of the attachment, truncated to 20 characters for the Gateway call.

Output shape

a JSON object representing the Gateway service response for saving the attachment, indicating success or details of any error

The operation uses the 'AnexoSistemaSP.salvar' Gateway service. It requires a valid session (keySession) and entity information (pkEntity and nameEntity). The description is optional and limited to 20 characters in the request. The response is parsed and errors are thrown for HTTP errors or Gateway-level failures.

Examples

Example 1: Attach a document file to a transaction record

Provide the target record's primary key as 'pkEntity', the active session key as 'keySession', the record's entity name as 'nameEntity', the attachment file name as 'nameAttach', and optionally a short description.

Links

Discussion