Python
import os
from samplehc import SampleHealthcare
client = SampleHealthcare(
api_key=os.environ.get("SAMPLEHC_API_KEY"), # This is the default and can be omitted
)
response = client.v2.documents.generate_csv(
file_name="fileName",
rows=[{
"foo": "string"
}],
)
print(response.document){
"document": {
"id": "<string>",
"fileName": "<string>"
}
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123,
"details": {}
}{
"error": "<string>"
}Document
Generate CSV document
Creates a new CSV document from the provided rows of data and returns the new document’s metadata.
POST
/
api
/
v2
/
documents
/
generate-csv
Python
import os
from samplehc import SampleHealthcare
client = SampleHealthcare(
api_key=os.environ.get("SAMPLEHC_API_KEY"), # This is the default and can be omitted
)
response = client.v2.documents.generate_csv(
file_name="fileName",
rows=[{
"foo": "string"
}],
)
print(response.document){
"document": {
"id": "<string>",
"fileName": "<string>"
}
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123,
"details": {}
}{
"error": "<string>"
}Body
application/json
Response
CSV document generated successfully.
Metadata of the newly generated CSV document.
Show child attributes
Show child attributes