Description (Upload File to Company Entity)
Action to upload files which relate to company. (POST)
End Point
https://api-h2h-staging.yedpay.com/v1/companies/{{company_id}}/documents
Variable
| # | Name | Type | Description |
|---|---|---|---|
| 1 | company_id | String | Company's ID |
Request Header
| # | Key | Value | Description |
|---|---|---|---|
| 1 | Authorization | Bearer {{access_token}} | Login Token |
| 2 | Content-Type | multipart/form-data | Form-data |
Body
| # | Name | Type | Description |
|---|---|---|---|
| 1 | file | File | Select the desired file |
| 2 | type | String | The type of file (Type "store_br" is for admin ONLY) |
| 3 | shared | Boolean | Share file or not |
| 4 | br_number | String | Business Registration number (for type='br' or 'store_br' only, optional) |
| 5 | branch_number | Numeric String | Branch number of the company (for type='br' or 'store_br' only, optional, default: 000) |
| 6 | expiry_date | Date | Expiry Date of the BR (for type='br' or 'store_br' only, optional), format: YYYY-mm-dd |
| 7 | store_id | String | Store ID of the Store BR (for type = 'store_br' only) |
| 8 | ci_number | String | Number of the CI (for type = "ci" only) |
| 9 | company_name | String | Company name displayed in the CI (for type = "ci" only) |
| 10 | date_of_establishment | String | CI's date of establishment (format: YYYY-MM-DD)(for type = "ci" only) |
| 11 | contract_type | Integer | Type of the contract (Required when type = "yedpay_contract") |
Response
| # | Name | Type | Description |
|---|---|---|---|
| 1 | success | Boolean | Upload File Success or Fail |
| 2 | data | Array | Include File's Information (id, user_id, type, etc..) |
Success Response - data
| # | Name | Type | Description |
|---|---|---|---|
| 1 | id | String | Id of the File |
| 2 | user_id | String | Id of the User |
| 3 | type | String | Type of the File |
| 4 | name | String | Name of the File |
| 5 | description | String | Description of the File |
| 6 | mime | String | MIME Type of the File |
| 7 | size | Integer | Size of the File |
| 8 | shared | Boolean | Whether the File is Shared or Not (true/false) |
| 9 | br_number | String | Business Registration number (for type="br" or "store_br" only) |
| 10 | branch_number | Numeric String | Branch number of the BR (for type="br" or "store_br" only) |
| 11 | registered_company_name | String | Company name displayed in the BR (for "br" type file only) |
| 12 | type_of_business | Integer | Type of business registered via the BR (for "br" type file only) |
| 13 | expiry_date | String | Expiry Date of the BR (format: yyyy-MM-dd) (for type="br" or "store_br" only) |
| 14 | ci_number | String | Number of the CI (for last "ci" type file only) |
| 15 | ir_number | String | Number of the IR (for last "ir" type file only) |
| 16 | company_name | String | Company name displayed in the CI/IR (for last "ci" / "ir" type file only) |
| 17 | date_of_establishment | String | CI's date of establishment (format: yyyy-MM-dd) (for last "ci" type file only) |
Example Success Response
//normal data
{
"success": true,
"data": {
"id": "0L7YMD6G",
"user_id": "MRNNMMR2",
"uploader_id": "JRJJ41R9",
"fileable_type": "App\Models\Company",
"fileable_id": "4RO4OORJ",
"type": "logo",
"name": "xxxxxxxxxxxx",
"description": "xxxxxxxxxxxxx",
"mime": "xxxxxxx",
"size": 781,
"shared": false,
"updated_at": 2026-01-26 11:20:45
}
}
//BR data
{
"success": true,
"data": {
"id": "4ROJ0OLJ",
"user_id": "O1L2M1LK",
"uploader_id": "1L2Q216K",
"fileable_type": "App\Models\Company",
"fileable_id": "1LPPM2LY",
"type": "br",
"name": "xxxxxxxxxxxx",
"description": "xxxxxxxxxxxxx",
"mime": "xxxxxxx",
"size": 781,
"shared": false,
"updated_at": 2026-01-26 11:20:45,
"registered_company_name": "xxxxxxxxx",
"type_of_business": 3,
"br_number": "67129731",
"branch_number": "010",
"expiry_date": "2026-01-26"
}
}
//CI data
{
"success": true,
"data": {
"id": "7L9D71RM",
"user_id": "E65V1J6Y",
"uploader_id": "1LPYNDLY",
"fileable_type": "App\Models\Company",
"fileable_id": "160P9OLO",
"type": "ci",
"name": "xxxxxxxxxxxx",
"description": "xxxxxxxxxxxxx",
"mime": "xxxxxxx",
"size": 781,
"shared": false,
"updated_at": 2026-01-26 11:20:45,
"ci_number": "11265207",
"company_name": "xxxxxxxxxxxx",
"date_of_establishment": "2026-01-26"
}
}
Example Error Response
{
"success": false,
"message": "Unauthenticated.",
"status": 500
}
Available Contract Type
| # | Type | Description |
|---|---|---|
| 0 | other_agreement | Other Agreement |
| 1 | offline_gateway_agreement | Offline Gateway Agreement |
| 2 | online_gateway_agreement | Online Gateway Agreement |
v1.89.5-20251216 © The Payment Cards Group Limited. All rights reserved.