POST https://xmp-open.nativex.com/v1/media/material/list
Common request parameters: please refer to Open API Protocol
Fields other than is_deleted, page, page_size must be passed at least one
Parameter | Type | Required | Instruction |
start_date | string | N | start date(creative create time) YYYY-MM-DD The start date cannot be later than the end date, and the maximum span cannot exceed 30 days |
end_date | string | N | end date(creative create time) YYYY-MM-DD Must be uploaded along with start date |
user_material_id | array | N | creative local id |
md5_file_id | array | N | creative md5 |
material_name | array | N | creative name (exact match) |
is_deleted | int | N | Whether to delete, if not, return all creatives. 0 means not deleted, 1 means deleted. |
folder_id | array | N | folder id |
page | int | N | Current page number, the default is 1 |
page_size | int | N | page size, the default is 200, 1~1000 is available |
{
"client_id": "xxx",
"timestamp": 1608776690,
"sign": "05d481dc241a7a1daa5b2a7fa2b51dc5",
"start_date":"2021-09-01",
"end_date":"2021-09-30",
"user_material_id":["81547","81546"],
"md5_file_id":["9ce6c0666045c02b839dce4d36951375","9ce6c0666045c02b839dce4d36951378"],
"material_name":["339_ZP_en.mp4","testnam"],
"is_deleted":0, # Other than "is_deleted、page、page_size",at least one of the other fields must be passed
"folder_id": [1111,22222],
"page":2,
"page_size":200
}
First-level Parameter | Second-level Parameter | Type | Instruction |
code | – | int | error code |
msg | – | string | message |
data | – | array | returned interface content |
data.list | – | array | returned data list |
– | material_name | string | creative name |
– | material_id | int | creative id |
– | user_material_id | int | creative local id |
– | md5_file_id | string | creative md5 |
– | material_type | string | creative type(image,video,other) |
– | tag_name | array | tag |
– | designer_name | array | designer |
– | customer_name | array | creative people |
– | width | int | width |
– | height | int | height |
– | shape | string | shape(horizontal, vertical, square) |
– | format | string | format |
– | duration | float | duration, in seconds (returns 0 if it is an image) |
– | bit_rate | float | Video bit rate, the unit is bps (returns 0 if it is an image) |
– | audit_reject | string | Media refusal information 0 means no refusal, 1 means refusal |
– | url | string | thumbnail url |
– | file_url | string | file url |
– | url_time | datetime | The validity period of the address, which will be updated every time the creative is returned |
– | size | float | File size, in bytes |
– | is_deleted | int | 0 for not deleted, 1 for deleted |
– | folder_id | int | folder id operation authority corresponds to the company administrator |
– | folder_name | string | folder name |
– | parent_folder_id | int | parent folder id returns 0 if there is none |
– | parent_folder_name | string | parent folder name returns null if there is none |
– | folder_type | string | Folder type 1 for my library, 2 for team library |
– | audit_status | int | audition status, 0 for pending approval, 1 for approved, -1 for disapproved, return -2 when the folder is not audited |
– | created_time | datetime | creative create time |
– | uptime | datetime | creative update time |
data.page | – | int | page |
– | page | int | current page |
– | page_size | int | page size |
– | next_page | int | 1 for there is a next page, 0 for there is no next page |
{
"code": 0,
"msg": "success",
"data": {
"data": [
{
"material_name": "191128-1280-2.jpg",
"material_id": 767476,
"user_material_id": 206374,
"md5_file_id": "45b95fd8e140473f087f78c280285ace",
"material_type": 1,
"tag_name": "",
"designer_name": "",
"width": 1280,
"height": 720,
"shape": "横版",
"format": "jpeg",
"duration": 0,
"bit_rate": 0,
"audit_reject": "",
"url": "",
"url_time": "2022-01-03 02:16:23",
"file_url": "",
"size": 0,
"folder_id": 123456483,
"folder_name": "测试文件夹",
"parent_folder_id": 123456,
"parent_folder_name": "",
"folder_type": 1,
"audit_status": -2,
"created_time": "2021-10-18 13:59:02",
"uptime": "2021-10-18 13:59:02",
"is_deleted":0
}
],
"page": {
"page": 1,
"page_size": 10,
"next_page": 0
}
}
}
POST https://xmp-open.nativex.com/v1/media/material/upload
Common request parameters: please refer to Open API Protocol
First-level Parameter | Second-level Parameter | Type | Required | Instruction |
data | – | – | – | data contains all objects to be uploaded |
– | folder_id | int | Y | folder id |
– | user_material_name | string | Y | Creative name, limited to 200 characters. Creative names in the same folder cannot be repeated. |
– | material_url | string | Y | Creative URL Support uploading OSS/S3 address |
– | material_ext | string | Y | Creative extension. Image:jpg、jpeg、png、bmp; Video:mp4、mov、avi、mpeg; Playable:html、htm |
– | material_type | int | Y | creative type 1 for image, 2 for video, 10 for playable |
– | media | string | N | Channel Required when the material type = 10, you can pass: mintegral, applovin, unity, ironsource, only one can be passed |
– | tag_name | string | N | tag name, default is null. Multiple values can be passed in. When the incoming value does not exist under the company dimension, a new label will be created at the same time. Currently xmp only supports first-level tags |
– | customer_id | int | N | creative people, default is null. Pass any user ID under the company (enable status) |
– | designer_id | int | N | desinger, default is null. Multiple user IDs under the design department (enable status) must be passed. |
– | audit_status | int | N | Audit status, the default is approved, 0: pending review, 1: approved, -1: not approved. Only valid when the asset library is enabled for review |
{
"client_id": "xxxx",
"timestamp": 1608776690,
"sign": "05d481dc241a7a1daa5b2a7fa2b51dc5",
"data": [
{
"material_type": 1,
"material_url": "https://xxx.com/image/5d/sc_upload.png",
"user_material_name": "sc_upload.png",
"material_ext": "png",
"tag_name": [
"tag1","tag2"
],
"folder_id": 12345,
"designer_id": [
111,222
],
"customer_id": [
333
]
}
]
}
First-level Parameter | Second-level Parameter | Type | Instruction |
code | – | int | error code |
msg | – | string | message |
data | – | array | returned interface content |
– | folder_id | int | folder ID |
– | user_material_id | int | The creative ID inside xmp, which is unique. The field is 0 when upload fails. |
– | user_material_name | string | XMP creative name |
– | status | int | status, 0 for failed, 1 for successful |
– | error_msg | string | error message |
{
"code": 0,
"msg": "success",
"data": [
{
"folder_id": 12345,
"user_material_id": 123445,
"user_material_name": "sc_upload.png",
"status": 1,
"error_msg": ""
}
]
}
POST https://xmp-open.nativex.com/v1/media/folder/list
Common request parameters: please refer to Open API Protocol
Parameter | Type | Required | Instruction |
folder_type | int | Y | folder type 1 for my library, 2 for team library |
parent_folder_id | int | N | parent folder ID |
{
"client_id": "xxxx",
"timestamp": 1608776690,
"sign": "05d481dc241a7a1daa5b2a7fa2b51dc5",
"parent_folder_id": [1234569799,1234569798],
"folder_type": 1
}
First-level Parameter | Second-level Parameter | Third-level Parameter | Type | Instruction |
code | – | – | int | error code |
msg | – | – | string | message |
data | – | – | array | returned interface content |
– | folder_id | – | int | folder ID |
– | folder_name | – | string | folder name |
– | folder_type | – | int | folder type 1 for my library, 2 for team library |
– | parent_folder_id | – | int | parent folder id |
– | parent_folder_name | – | string | parent folder name |
– | is_audit | – | int | whether to enable auditing 0 for no, 1 for yes |
– | auth_type | – | int | authourity type 1为自己可见,2为指定用户/团队可见,4为本公司可见 |
– | auth_config | – | array | This configuration is only available when authorization scope = 2 |
– | – | team_id | int | team ID |
– | – | user_id | int | user ID |
{
"code": 0,
"msg": "success",
"data": [
{
"folder_id": 1234569796,
"folder_name": "test",
"folder_type": 1,
"parent_folder_id": 1234569799,
"parent_folder_name": "test",
"is_audit": 0,
"auth_type": 4,
"auth_config": []
},
{
"folder_id": 1234569797,
"folder_name": "test",
"folder_type": 1,
"parent_folder_id": 1234569798,
"parent_folder_name": "test",
"is_audit": 0,
"auth_type": 2,
"auth_config": [
{
"team_id": 234,
"user_id": 1234
}
]
}
]
}
POST https://xmp-open.nativex.com/v1/media/folder/add
Common request parameters: please refer to Open API Protocol
First-level Parameter | Second-level Parameter | Third-level Parameter | Type | Required | Instruction |
data | – | – | array | – | data contains all objects to be uploaded |
– | parent_folder_id | – | int | Y | parent folder ID When parent folder ID=0, it means to create a new first-level folder under the creative library |
– | folder_name | – | string | Y | Folder name, 200 characters limit |
– | folder_type | – | int | N | Folder type 1 for my library, 2 for team library |
– | is_audit | – | int | N | Whether to enable auditing, when the parent folder id=0, select and upload. 0 for no, 1 for yes, default no |
– | auth_type | – | int | N | Authority type. Required when parent folder id=0. 1 is visible only to yourself, 2 is visible to designated users/teams, 4 is visible to the company. |
– | auth_config | – | array | N | Requires when auth_type=2 |
– | – | team_id | int | N | team ID |
– | – | user_id | int | N | User ID. When the department ID and user ID are uploaded at the same time, the user ID shall prevail. |
{
"client_id": "xxxx",
"timestamp": 1608776690,
"sign": "05d481dc241a7a1daa5b2a7fa2b51dc5",
"data": [
{
"parent_folder_id": 123,
"folder_type": 2,
"folder_name": "test",
"is_audit": 1,
"auth_type": 2,
"auth_config": [
{
"user_id": 22
},
{
"team_id": 11
}
]
}
]
}
First-level Parameter | Second-level Parameter | Type | Instruction |
code | – | int | error code |
msg | – | string | message |
data | – | array | returned interface content |
– | parent_folder_id | int | parent folder ID |
– | folder_id | int | folder ID |
– | folder_name | string | folder name |
– | status | int | status 0 for unsuccessfully, 1 for successfully |
– | error_msg | string | error message |
{
"code": 0,
"msg": "success",
"data": [
{
"parent_folder_id": 123,
"folder_id": 1234556,
"folder_name": "test",
"status": 1,
"error_msg": ""
}
]
}