- CreateMany - Create envelope items
- UpdateMany - Update envelope items
- Delete - Delete envelope item
- Download - Download an envelope item
Create multiple envelope items for an envelope
package main
import(
"context"
"os"
sdkgo "github.com/documenso/sdk-go"
"github.com/documenso/sdk-go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := sdkgo.New(
sdkgo.WithSecurity(os.Getenv("DOCUMENSO_API_KEY")),
)
res, err := s.Envelopes.Items.CreateMany(ctx, operations.EnvelopeItemCreateManyRequest{
Payload: operations.EnvelopeItemCreateManyPayload{
EnvelopeID: "<id>",
},
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.EnvelopeItemCreateManyRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.EnvelopeItemCreateManyResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| apierrors.EnvelopeItemCreateManyBadRequestError | 400 | application/json |
| apierrors.EnvelopeItemCreateManyUnauthorizedError | 401 | application/json |
| apierrors.EnvelopeItemCreateManyForbiddenError | 403 | application/json |
| apierrors.EnvelopeItemCreateManyInternalServerError | 500 | application/json |
| apierrors.APIError | 4XX, 5XX | */* |
Update multiple envelope items for an envelope
package main
import(
"context"
"os"
sdkgo "github.com/documenso/sdk-go"
"github.com/documenso/sdk-go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := sdkgo.New(
sdkgo.WithSecurity(os.Getenv("DOCUMENSO_API_KEY")),
)
res, err := s.Envelopes.Items.UpdateMany(ctx, operations.EnvelopeItemUpdateManyRequest{
EnvelopeID: "<id>",
Data: []operations.EnvelopeItemUpdateManyDataRequest{},
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.EnvelopeItemUpdateManyRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.EnvelopeItemUpdateManyResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| apierrors.EnvelopeItemUpdateManyBadRequestError | 400 | application/json |
| apierrors.EnvelopeItemUpdateManyUnauthorizedError | 401 | application/json |
| apierrors.EnvelopeItemUpdateManyForbiddenError | 403 | application/json |
| apierrors.EnvelopeItemUpdateManyInternalServerError | 500 | application/json |
| apierrors.APIError | 4XX, 5XX | */* |
Delete an envelope item from an envelope
package main
import(
"context"
"os"
sdkgo "github.com/documenso/sdk-go"
"github.com/documenso/sdk-go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := sdkgo.New(
sdkgo.WithSecurity(os.Getenv("DOCUMENSO_API_KEY")),
)
res, err := s.Envelopes.Items.Delete(ctx, operations.EnvelopeItemDeleteRequest{
EnvelopeID: "<id>",
EnvelopeItemID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.EnvelopeItemDeleteRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.EnvelopeItemDeleteResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| apierrors.EnvelopeItemDeleteBadRequestError | 400 | application/json |
| apierrors.EnvelopeItemDeleteUnauthorizedError | 401 | application/json |
| apierrors.EnvelopeItemDeleteForbiddenError | 403 | application/json |
| apierrors.EnvelopeItemDeleteInternalServerError | 500 | application/json |
| apierrors.APIError | 4XX, 5XX | */* |
Download an envelope item by its ID
package main
import(
"context"
"os"
sdkgo "github.com/documenso/sdk-go"
"github.com/documenso/sdk-go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := sdkgo.New(
sdkgo.WithSecurity(os.Getenv("DOCUMENSO_API_KEY")),
)
res, err := s.Envelopes.Items.Download(ctx, "<id>", operations.EnvelopeItemDownloadVersionSigned.ToPointer())
if err != nil {
log.Fatal(err)
}
if res.Any != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
envelopeItemID |
string | ✔️ | The ID of the envelope item to download. |
version |
*operations.EnvelopeItemDownloadVersion | ➖ | The version of the envelope item to download. "signed" returns the completed document with signatures, "original" returns the original uploaded document. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.EnvelopeItemDownloadResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| apierrors.EnvelopeItemDownloadBadRequestError | 400 | application/json |
| apierrors.EnvelopeItemDownloadUnauthorizedError | 401 | application/json |
| apierrors.EnvelopeItemDownloadForbiddenError | 403 | application/json |
| apierrors.EnvelopeItemDownloadNotFoundError | 404 | application/json |
| apierrors.EnvelopeItemDownloadInternalServerError | 500 | application/json |
| apierrors.APIError | 4XX, 5XX | */* |