Create a Document by uploading your file to Petal
curl --request POST \
--url https://cite.petal.org/api/document/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form organization_id=123 \
--form 'doctype=<string>'
{
"annotation_ids": [
123
],
"created_at": "<string>",
"csl": {},
"doctype": "<string>",
"file_resource_size": 123,
"file_size": 123,
"filename": "<string>",
"id": 123,
"is_trash": true,
"meta": {},
"modified_at": "<string>",
"modified_by": 123,
"organization_id": 123,
"pages": 123,
"resource_size": 123,
"status": {},
"tag_ids": [
123
],
"ui": {},
"use_ocr": true,
"user": {
"id": 123,
"name": "<string>"
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
OK
The response is of type object
.
curl --request POST \
--url https://cite.petal.org/api/document/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form organization_id=123 \
--form 'doctype=<string>'
{
"annotation_ids": [
123
],
"created_at": "<string>",
"csl": {},
"doctype": "<string>",
"file_resource_size": 123,
"file_size": 123,
"filename": "<string>",
"id": 123,
"is_trash": true,
"meta": {},
"modified_at": "<string>",
"modified_by": 123,
"organization_id": 123,
"pages": 123,
"resource_size": 123,
"status": {},
"tag_ids": [
123
],
"ui": {},
"use_ocr": true,
"user": {
"id": 123,
"name": "<string>"
}
}
Create a Document by uploading your file to Petal
curl --request POST \
--url https://cite.petal.org/api/document/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form organization_id=123 \
--form 'doctype=<string>'
{
"annotation_ids": [
123
],
"created_at": "<string>",
"csl": {},
"doctype": "<string>",
"file_resource_size": 123,
"file_size": 123,
"filename": "<string>",
"id": 123,
"is_trash": true,
"meta": {},
"modified_at": "<string>",
"modified_by": 123,
"organization_id": 123,
"pages": 123,
"resource_size": 123,
"status": {},
"tag_ids": [
123
],
"ui": {},
"use_ocr": true,
"user": {
"id": 123,
"name": "<string>"
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
OK
The response is of type object
.
curl --request POST \
--url https://cite.petal.org/api/document/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form organization_id=123 \
--form 'doctype=<string>'
{
"annotation_ids": [
123
],
"created_at": "<string>",
"csl": {},
"doctype": "<string>",
"file_resource_size": 123,
"file_size": 123,
"filename": "<string>",
"id": 123,
"is_trash": true,
"meta": {},
"modified_at": "<string>",
"modified_by": 123,
"organization_id": 123,
"pages": 123,
"resource_size": 123,
"status": {},
"tag_ids": [
123
],
"ui": {},
"use_ocr": true,
"user": {
"id": 123,
"name": "<string>"
}
}