File
self
LINK RELATION
Actions
method | description |
---|---|
GET | View file |
PATCH | Update file |
DELETE | Remove file |
OPTIONS | Retrieve supported HTTP methods |
Request parameters
name | type | required |
---|---|---|
content_type | string | false |
name | string | false |
size | integer | false |
Profile
A File represents metadata about a binary file.
Links are provided for both upload and download of the actual binary content. See ch:data for more information about uploading and retrieving binary content.
Properties
name | type | read-only |
---|---|---|
label | string | true |
content_type | string | false |
name | string | false |
size | integer | false |
Link relations
rel | conditional |
---|---|
self | false |
ch:application1 | true |
ch:comments1 | true |
ch:data | false |
ch:dispute1 | true |
ch:person1 | true |
1
Presence depends on file ownership context.
Additional semantics
No additional semantics.
Example representation
{
"label": "bank_statement",
"name": "bank_statement",
"content_type": "application/pdf",
"_links": {
"self": {
"href": "https://merchant.test.clearhaus.com/files/93cc1a9a-70f7-48d3-afad-d5de920414bc"
},
"ch:application": {
"href": "https://merchant.test.clearhaus.com/applications/3128a7e4-9594-42fb-a9bd-4f444b58110f"
},
"ch:comments": {
"href": "https://merchant.test.clearhaus.com/files/93cc1a9a-70f7-48d3-afad-d5de920414bc/comments{?page,per_page}"
},
"ch:data": [
{
"href": "https://clrhs-staging-cutter.s3.amazonaws.com/5/faf8e4b963ceb372be2cf1b43d37cb3b4eaa7bba503bfb6c41c102710fd695ea.pdf?AWSAccessKeyId=AKIAJES3GRGWBQL7JHXA&Expires=1469819943&Signature=xq029mepfm1ii90b00tfZQQlg94%3D",
"name": "upload"
},
{
"href": "https://merchant.test.clearhaus.com/files/93cc1a9a-70f7-48d3-afad-d5de920414bc/content",
"name": "download"
}
],
"curies": [
{
"href": "https://developer.clearhaus.com/rels/{rel}",
"templated": true,
"name": "ch"
}
]
}
}