List all documents links ordered by created_at descending.
{- "data": [
- {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "document_link",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "document_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "linked_record_type": "porting_order",
- "linked_resource_id": "132091b4-442b-4a2a-b87f-61e707e46d54"
}
], - "meta": {
- "page_number": 2,
- "page_size": 25,
- "total_pages": 3,
- "total_results": 55
}
}
List all documents ordered by created_at descending.
{- "data": [
- {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "document",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "content_type": "application/pdf",
- "customer_reference": "MY REF 001",
- "filename": "test-document.pdf",
- "sha256": "08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c",
- "size": {
- "amount": 123456,
- "unit": "bytes"
}, - "status": "pending"
}
], - "meta": {
- "page_number": 2,
- "page_size": 25,
- "total_pages": 3,
- "total_results": 55
}
}
Upload a document.
Uploaded files must be linked to a service within 30 minutes or they will be automatically deleted.
Successful response
Unprocessable entity. Check the 'detail' field in response for details.
{- "customer_reference": "MY REF 001",
- "filename": "test-document.pdf",
}
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "document",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "content_type": "application/pdf",
- "customer_reference": "MY REF 001",
- "filename": "test-document.pdf",
- "sha256": "08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c",
- "size": {
- "amount": 123456,
- "unit": "bytes"
}, - "status": "pending"
}
}
Delete a document.
A document can only be deleted if it's not linked to a service. If it is linked to a service, it must be unlinked prior to deleting.
Successful response
object (DocServiceDocument) | |||||||||||||||||||||
|
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "document",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "content_type": "application/pdf",
- "customer_reference": "MY REF 001",
- "filename": "test-document.pdf",
- "sha256": "08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c",
- "size": {
- "amount": 123456,
- "unit": "bytes"
}, - "status": "pending"
}
}
Retrieve a document.
Successful response
object (DocServiceDocument) | |||||||||||||||||||||
|
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "document",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "content_type": "application/pdf",
- "customer_reference": "MY REF 001",
- "filename": "test-document.pdf",
- "sha256": "08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c",
- "size": {
- "amount": 123456,
- "unit": "bytes"
}, - "status": "pending"
}
}
Update a document.
Successful response
object (DocServiceDocument) | |||||||||||||||||||||
|
{- "customer_reference": "MY REF 001",
- "filename": "test-document.pdf"
}
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "document",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "content_type": "application/pdf",
- "customer_reference": "MY REF 001",
- "filename": "test-document.pdf",
- "sha256": "08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c",
- "size": {
- "amount": 123456,
- "unit": "bytes"
}, - "status": "pending"
}
}
{- "errors": [
- {
- "code": "string",
- "detail": "string",
- "meta": { },
- "source": {
- "parameter": "string",
- "pointer": "/json/pointer"
}, - "title": "string"
}
]
}