Files

22 KiB

\LegalAPI

All URIs are relative to https://api.hanzo.ai

Method HTTP request Description
GetLegalDocuments Get /v1/legal/documents Returns the org's generated documents, newest first, WITHOUT their rendered content — fetch one document to read its body.
GetLegalDocumentsById Get /v1/legal/documents/{id} Returns one of the org's documents WITH its rendered body.
GetLegalFilings Get /v1/legal/filings Returns the org's filing records, newest first — which documents were filed where, through which provider, and what the filing's honest status is.
GetLegalHealth Get /v1/legal/health Reports that the legal subsystem is serving and how many built-in templates its catalog carries.
GetLegalTemplates Get /v1/legal/templates Returns the org's effective template catalog: every built-in template, with any the org has overridden replaced by its own latest version.
GetLegalTemplatesById Get /v1/legal/templates/{id} Returns one template resolved for the caller's org — the org's own override if it has saved one, else the built-in — with its full text/template body and its declared merge fields.
PostLegalDocuments Post /v1/legal/documents Renders a document from a template and the caller's own merge data, seals it in the org's store, and returns it with its rendered body.
PostLegalDocumentsByIdSign Post /v1/legal/documents/{id}/sign Opens an e-signature request over one document and moves it to out_for_signature, returning the provider's reference for the request.
PostLegalDocumentsByIdSignComplete Post /v1/legal/documents/{id}/sign/complete Record that a generated document's signature request completed
PostLegalFilings Post /v1/legal/filings Records a filing of one or more of the org's documents with a state or agency, and returns the tracking record.
PutLegalTemplatesById Put /v1/legal/templates/{id} Saves the org's own version of a template — a custom NDA, a house MSA — and returns it with its new version number.

GetLegalDocuments

LegalDocumentPage GetLegalDocuments(ctx).Limit(limit).Execute()

Returns the org's generated documents, newest first, WITHOUT their rendered content — fetch one document to read its body.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {
	limit := int64(789) // int64 | Limit bounds the page. Absent or unparseable means the store's own default. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.LegalAPI.GetLegalDocuments(context.Background()).Limit(limit).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LegalAPI.GetLegalDocuments``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetLegalDocuments`: LegalDocumentPage
	fmt.Fprintf(os.Stdout, "Response from `LegalAPI.GetLegalDocuments`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGetLegalDocumentsRequest struct via the builder pattern

Name Type Description Notes
limit int64 Limit bounds the page. Absent or unparseable means the store's own default.

Return type

LegalDocumentPage

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetLegalDocumentsById

LegalDocumentReply GetLegalDocumentsById(ctx, id).Execute()

Returns one of the org's documents WITH its rendered body.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {
	id := "id_example" // string | ID is the document's server-minted handle, \"doc_\"-prefixed.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.LegalAPI.GetLegalDocumentsById(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LegalAPI.GetLegalDocumentsById``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetLegalDocumentsById`: LegalDocumentReply
	fmt.Fprintf(os.Stdout, "Response from `LegalAPI.GetLegalDocumentsById`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string ID is the document's server-minted handle, "doc_"-prefixed.

Other Parameters

Other parameters are passed through a pointer to a apiGetLegalDocumentsByIdRequest struct via the builder pattern

Name Type Description Notes

Return type

LegalDocumentReply

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetLegalFilings

LegalFilingPage GetLegalFilings(ctx).Limit(limit).Execute()

Returns the org's filing records, newest first — which documents were filed where, through which provider, and what the filing's honest status is.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {
	limit := int64(789) // int64 | Limit bounds the page. Absent or unparseable means the store's own default. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.LegalAPI.GetLegalFilings(context.Background()).Limit(limit).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LegalAPI.GetLegalFilings``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetLegalFilings`: LegalFilingPage
	fmt.Fprintf(os.Stdout, "Response from `LegalAPI.GetLegalFilings`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGetLegalFilingsRequest struct via the builder pattern

Name Type Description Notes
limit int64 Limit bounds the page. Absent or unparseable means the store's own default.

Return type

LegalFilingPage

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetLegalHealth

LegalLegalHealth GetLegalHealth(ctx).Execute()

Reports that the legal subsystem is serving and how many built-in templates its catalog carries.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.LegalAPI.GetLegalHealth(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LegalAPI.GetLegalHealth``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetLegalHealth`: LegalLegalHealth
	fmt.Fprintf(os.Stdout, "Response from `LegalAPI.GetLegalHealth`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetLegalHealthRequest struct via the builder pattern

Return type

LegalLegalHealth

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetLegalTemplates

LegalTemplateCatalog GetLegalTemplates(ctx).Execute()

Returns the org's effective template catalog: every built-in template, with any the org has overridden replaced by its own latest version.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.LegalAPI.GetLegalTemplates(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LegalAPI.GetLegalTemplates``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetLegalTemplates`: LegalTemplateCatalog
	fmt.Fprintf(os.Stdout, "Response from `LegalAPI.GetLegalTemplates`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetLegalTemplatesRequest struct via the builder pattern

Return type

LegalTemplateCatalog

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetLegalTemplatesById

LegalTemplateReply GetLegalTemplatesById(ctx, id).Execute()

Returns one template resolved for the caller's org — the org's own override if it has saved one, else the built-in — with its full text/template body and its declared merge fields.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {
	id := "id_example" // string | ID is the template's stable id, e.g. \"nda\" or \"safe\".

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.LegalAPI.GetLegalTemplatesById(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LegalAPI.GetLegalTemplatesById``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetLegalTemplatesById`: LegalTemplateReply
	fmt.Fprintf(os.Stdout, "Response from `LegalAPI.GetLegalTemplatesById`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string ID is the template's stable id, e.g. "nda" or "safe".

Other Parameters

Other parameters are passed through a pointer to a apiGetLegalTemplatesByIdRequest struct via the builder pattern

Name Type Description Notes

Return type

LegalTemplateReply

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostLegalDocuments

LegalDocumentReply PostLegalDocuments(ctx).LegalGenerateRequest(legalGenerateRequest).Execute()

Renders a document from a template and the caller's own merge data, seals it in the org's store, and returns it with its rendered body.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {
	legalGenerateRequest := *openapiclient.NewLegalGenerateRequest() // LegalGenerateRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.LegalAPI.PostLegalDocuments(context.Background()).LegalGenerateRequest(legalGenerateRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LegalAPI.PostLegalDocuments``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PostLegalDocuments`: LegalDocumentReply
	fmt.Fprintf(os.Stdout, "Response from `LegalAPI.PostLegalDocuments`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiPostLegalDocumentsRequest struct via the builder pattern

Name Type Description Notes
legalGenerateRequest LegalGenerateRequest

Return type

LegalDocumentReply

Authorization

bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostLegalDocumentsByIdSign

LegalSignReply PostLegalDocumentsByIdSign(ctx, id).LegalSignRequest(legalSignRequest).Execute()

Opens an e-signature request over one document and moves it to out_for_signature, returning the provider's reference for the request.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {
	id := "doc_1f…" // string | ID is the document to send for signature, from the path.
	legalSignRequest := *openapiclient.NewLegalSignRequest() // LegalSignRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.LegalAPI.PostLegalDocumentsByIdSign(context.Background(), id).LegalSignRequest(legalSignRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LegalAPI.PostLegalDocumentsByIdSign``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PostLegalDocumentsByIdSign`: LegalSignReply
	fmt.Fprintf(os.Stdout, "Response from `LegalAPI.PostLegalDocumentsByIdSign`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string ID is the document to send for signature, from the path.

Other Parameters

Other parameters are passed through a pointer to a apiPostLegalDocumentsByIdSignRequest struct via the builder pattern

Name Type Description Notes

legalSignRequest | LegalSignRequest | |

Return type

LegalSignReply

Authorization

bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostLegalDocumentsByIdSignComplete

PostLegalDocumentsByIdSignComplete(ctx, id).Execute()

Record that a generated document's signature request completed

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {
	id := "id_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.LegalAPI.PostLegalDocumentsByIdSignComplete(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LegalAPI.PostLegalDocumentsByIdSignComplete``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

Other parameters are passed through a pointer to a apiPostLegalDocumentsByIdSignCompleteRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostLegalFilings

LegalFilingReply PostLegalFilings(ctx).LegalFilingRequest(legalFilingRequest).Execute()

Records a filing of one or more of the org's documents with a state or agency, and returns the tracking record.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {
	legalFilingRequest := *openapiclient.NewLegalFilingRequest() // LegalFilingRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.LegalAPI.PostLegalFilings(context.Background()).LegalFilingRequest(legalFilingRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LegalAPI.PostLegalFilings``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PostLegalFilings`: LegalFilingReply
	fmt.Fprintf(os.Stdout, "Response from `LegalAPI.PostLegalFilings`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiPostLegalFilingsRequest struct via the builder pattern

Name Type Description Notes
legalFilingRequest LegalFilingRequest

Return type

LegalFilingReply

Authorization

bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PutLegalTemplatesById

LegalTemplateReply PutLegalTemplatesById(ctx, id).LegalTemplateOverride(legalTemplateOverride).Execute()

Saves the org's own version of a template — a custom NDA, a house MSA — and returns it with its new version number.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {
	id := "nda" // string | ID is the template to override, from the path. Overriding a built-in id inherits that built-in's category, title and counsel-review posture.
	legalTemplateOverride := *openapiclient.NewLegalTemplateOverride() // LegalTemplateOverride | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.LegalAPI.PutLegalTemplatesById(context.Background(), id).LegalTemplateOverride(legalTemplateOverride).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LegalAPI.PutLegalTemplatesById``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PutLegalTemplatesById`: LegalTemplateReply
	fmt.Fprintf(os.Stdout, "Response from `LegalAPI.PutLegalTemplatesById`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string ID is the template to override, from the path. Overriding a built-in id inherits that built-in's category, title and counsel-review posture.

Other Parameters

Other parameters are passed through a pointer to a apiPutLegalTemplatesByIdRequest struct via the builder pattern

Name Type Description Notes

legalTemplateOverride | LegalTemplateOverride | |

Return type

LegalTemplateReply

Authorization

bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]