Update notifications
curl --request PATCH \
--url https://api-staging.pixwel.com/api/notifications \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"_id": "507f1f77bcf86cd799439011",
"from": "507f1f77bcf86cd799439011",
"to": "507f1f77bcf86cd799439011",
"event": {
"_id": "507f1f77bcf86cd799439011",
"processed": true,
"pushed": true,
"digested": true,
"created": 123,
"body": "<string>",
"graphicsFile": {
"id": "<string>",
"url": "https://example.com/path/to/object",
"name": "<string>",
"rootId": "<string>",
"version": 123
},
"graphicsComment": {
"id": "<string>",
"replyTo": "<string>",
"body": "<string>",
"user": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"email": "user@example.com"
},
"created": 123,
"fileId": "<string>"
},
"notify": {
"users": [
"507f1f77bcf86cd799439011"
],
"groups": [
"507f1f77bcf86cd799439011"
]
},
"from": {
"_id": "507f1f77bcf86cd799439011",
"status": {
"invited": true,
"approved": true,
"registered": true,
"confirmed": true
},
"invite": "https://example.com/path/to/object",
"name": "<string>",
"username": "user@example.com",
"emailNormal": "user@example.com"
},
"type": "<string>",
"workRequest": {
"_id": "507f1f77bcf86cd799439011",
"auto": true,
"autosubs": true,
"dualLanguages": true,
"aspectRatio": "<string>",
"status": "<string>",
"from": "507f1f77bcf86cd799439011",
"asset": "507f1f77bcf86cd799439011",
"assetType": "<string>",
"assetCategory": "<string>",
"due": {
"date": 123,
"tz": "<string>"
},
"deliveryDeadline": {
"date": 123,
"tz": "<string>"
},
"autoMode": true,
"language": "<string>",
"territory": "<string>",
"dng": {
"dialogue": [
"<string>"
],
"graphics": [
"<string>"
],
"narration": [
"<string>"
]
},
"audioFile": "<unknown>",
"instructions": "<string>",
"urls": {
"view": "https://example.com/path/to/object",
"manage": "https://example.com/path/to/object",
"invite": "https://example.com/path/to/object",
"translate": "https://example.com/path/to/object"
},
"files": [
{
"name": "<string>",
"files": "<unknown>"
}
],
"uses": {
"items": [
"<string>"
],
"details": {}
},
"dcp": {
"items": [
"<string>"
],
"details": {}
},
"recipients": {},
"shippingAddresses": {},
"project": "507f1f77bcf86cd799439011",
"studio": "507f1f77bcf86cd799439011",
"estimate": {
"base": {
"graphics": 123,
"narration": 123,
"scripts": 123,
"dubbing": 123,
"subtitling": 123,
"hybrid": 123,
"encoding": 123,
"autosubs": 123,
"autogfx": 123
},
"applied": {
"graphics": 123,
"narration": 123,
"scripts": 123,
"dubbing": 123,
"subtitling": 123,
"hybrid": 123,
"encoding": 123,
"autosubs": 123,
"autogfx": 123,
"files": 123,
"total": 123
}
},
"materials": [
{
"name": "<string>",
"complete": true,
"approved": true,
"files": [
{
"id": "<string>",
"url": "https://example.com/path/to/object",
"name": "<string>",
"uploadedAt": 123,
"rootId": "<string>",
"version": 123,
"isCurrentVersion": true,
"previousVersionId": "<unknown>"
}
],
"changeRequests": [
{
"id": "<string>",
"_id": "<string>",
"_optimistic": true,
"fileId": "<string>",
"body": "<string>",
"status": "<string>",
"user": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"email": "user@example.com"
},
"requestedBy": {
"_id": "507f1f77bcf86cd799439011",
"email": "user@example.com"
},
"requestedAt": 123,
"created": 123,
"replies": [
{
"id": "<string>",
"_id": "<string>",
"_optimistic": true,
"replyTo": "<string>",
"body": "<string>",
"user": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"email": "user@example.com"
},
"created": 123,
"editedAt": 123
}
],
"editedAt": 123
}
]
}
],
"rejections": "<unknown>",
"history": [
{
"date": 123,
"user": {
"_id": "507f1f77bcf86cd799439011",
"emailNormal": "user@example.com",
"name": "<string>",
"groups": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>"
}
]
},
"status": "<string>",
"reason": "<string>"
}
],
"reason": "<string>",
"graphicsTranslation": "507f1f77bcf86cd799439011",
"translation": "507f1f77bcf86cd799439011",
"tags": "<unknown>"
},
"projects": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"slug": "<string>"
}
],
"assets": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"project": "507f1f77bcf86cd799439011",
"type": "<string>",
"notifyUrl": "https://example.com/path/to/object"
}
],
"urls": {
"view": "https://example.com/path/to/object",
"manage": "https://example.com/path/to/object",
"invite": "https://example.com/path/to/object",
"translate": "https://example.com/path/to/object"
},
"assetTypes": [
"<string>"
]
},
"type": "<string>",
"title": "<string>",
"emailSubject": "<string>",
"read": true,
"viewed": true,
"sent": true,
"added": 123,
"created": 123,
"$links": {
"self": "//example.com/path/to/object"
}
}
'import requests
url = "https://api-staging.pixwel.com/api/notifications"
payload = {
"_id": "507f1f77bcf86cd799439011",
"from": "507f1f77bcf86cd799439011",
"to": "507f1f77bcf86cd799439011",
"event": {
"_id": "507f1f77bcf86cd799439011",
"processed": True,
"pushed": True,
"digested": True,
"created": 123,
"body": "<string>",
"graphicsFile": {
"id": "<string>",
"url": "https://example.com/path/to/object",
"name": "<string>",
"rootId": "<string>",
"version": 123
},
"graphicsComment": {
"id": "<string>",
"replyTo": "<string>",
"body": "<string>",
"user": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"email": "user@example.com"
},
"created": 123,
"fileId": "<string>"
},
"notify": {
"users": ["507f1f77bcf86cd799439011"],
"groups": ["507f1f77bcf86cd799439011"]
},
"from": {
"_id": "507f1f77bcf86cd799439011",
"status": {
"invited": True,
"approved": True,
"registered": True,
"confirmed": True
},
"invite": "https://example.com/path/to/object",
"name": "<string>",
"username": "user@example.com",
"emailNormal": "user@example.com"
},
"type": "<string>",
"workRequest": {
"_id": "507f1f77bcf86cd799439011",
"auto": True,
"autosubs": True,
"dualLanguages": True,
"aspectRatio": "<string>",
"status": "<string>",
"from": "507f1f77bcf86cd799439011",
"asset": "507f1f77bcf86cd799439011",
"assetType": "<string>",
"assetCategory": "<string>",
"due": {
"date": 123,
"tz": "<string>"
},
"deliveryDeadline": {
"date": 123,
"tz": "<string>"
},
"autoMode": True,
"language": "<string>",
"territory": "<string>",
"dng": {
"dialogue": ["<string>"],
"graphics": ["<string>"],
"narration": ["<string>"]
},
"audioFile": "<unknown>",
"instructions": "<string>",
"urls": {
"view": "https://example.com/path/to/object",
"manage": "https://example.com/path/to/object",
"invite": "https://example.com/path/to/object",
"translate": "https://example.com/path/to/object"
},
"files": [
{
"name": "<string>",
"files": "<unknown>"
}
],
"uses": {
"items": ["<string>"],
"details": {}
},
"dcp": {
"items": ["<string>"],
"details": {}
},
"recipients": {},
"shippingAddresses": {},
"project": "507f1f77bcf86cd799439011",
"studio": "507f1f77bcf86cd799439011",
"estimate": {
"base": {
"graphics": 123,
"narration": 123,
"scripts": 123,
"dubbing": 123,
"subtitling": 123,
"hybrid": 123,
"encoding": 123,
"autosubs": 123,
"autogfx": 123
},
"applied": {
"graphics": 123,
"narration": 123,
"scripts": 123,
"dubbing": 123,
"subtitling": 123,
"hybrid": 123,
"encoding": 123,
"autosubs": 123,
"autogfx": 123,
"files": 123,
"total": 123
}
},
"materials": [
{
"name": "<string>",
"complete": True,
"approved": True,
"files": [
{
"id": "<string>",
"url": "https://example.com/path/to/object",
"name": "<string>",
"uploadedAt": 123,
"rootId": "<string>",
"version": 123,
"isCurrentVersion": True,
"previousVersionId": "<unknown>"
}
],
"changeRequests": [
{
"id": "<string>",
"_id": "<string>",
"_optimistic": True,
"fileId": "<string>",
"body": "<string>",
"status": "<string>",
"user": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"email": "user@example.com"
},
"requestedBy": {
"_id": "507f1f77bcf86cd799439011",
"email": "user@example.com"
},
"requestedAt": 123,
"created": 123,
"replies": [
{
"id": "<string>",
"_id": "<string>",
"_optimistic": True,
"replyTo": "<string>",
"body": "<string>",
"user": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"email": "user@example.com"
},
"created": 123,
"editedAt": 123
}
],
"editedAt": 123
}
]
}
],
"rejections": "<unknown>",
"history": [
{
"date": 123,
"user": {
"_id": "507f1f77bcf86cd799439011",
"emailNormal": "user@example.com",
"name": "<string>",
"groups": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>"
}
]
},
"status": "<string>",
"reason": "<string>"
}
],
"reason": "<string>",
"graphicsTranslation": "507f1f77bcf86cd799439011",
"translation": "507f1f77bcf86cd799439011",
"tags": "<unknown>"
},
"projects": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"slug": "<string>"
}
],
"assets": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"project": "507f1f77bcf86cd799439011",
"type": "<string>",
"notifyUrl": "https://example.com/path/to/object"
}
],
"urls": {
"view": "https://example.com/path/to/object",
"manage": "https://example.com/path/to/object",
"invite": "https://example.com/path/to/object",
"translate": "https://example.com/path/to/object"
},
"assetTypes": ["<string>"]
},
"type": "<string>",
"title": "<string>",
"emailSubject": "<string>",
"read": True,
"viewed": True,
"sent": True,
"added": 123,
"created": 123,
"$links": { "self": "//example.com/path/to/object" }
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_id: '507f1f77bcf86cd799439011',
from: '507f1f77bcf86cd799439011',
to: '507f1f77bcf86cd799439011',
event: {
_id: '507f1f77bcf86cd799439011',
processed: true,
pushed: true,
digested: true,
created: 123,
body: JSON.stringify('<string>'),
graphicsFile: {
id: '<string>',
url: 'https://example.com/path/to/object',
name: '<string>',
rootId: '<string>',
version: 123
},
graphicsComment: {
id: '<string>',
replyTo: '<string>',
body: JSON.stringify('<string>'),
user: {_id: '507f1f77bcf86cd799439011', name: '<string>', email: 'user@example.com'},
created: 123,
fileId: '<string>'
},
notify: {users: ['507f1f77bcf86cd799439011'], groups: ['507f1f77bcf86cd799439011']},
from: {
_id: '507f1f77bcf86cd799439011',
status: {invited: true, approved: true, registered: true, confirmed: true},
invite: 'https://example.com/path/to/object',
name: '<string>',
username: 'user@example.com',
emailNormal: 'user@example.com'
},
type: '<string>',
workRequest: {
_id: '507f1f77bcf86cd799439011',
auto: true,
autosubs: true,
dualLanguages: true,
aspectRatio: '<string>',
status: '<string>',
from: '507f1f77bcf86cd799439011',
asset: '507f1f77bcf86cd799439011',
assetType: '<string>',
assetCategory: '<string>',
due: {date: 123, tz: '<string>'},
deliveryDeadline: {date: 123, tz: '<string>'},
autoMode: true,
language: '<string>',
territory: '<string>',
dng: {dialogue: ['<string>'], graphics: ['<string>'], narration: ['<string>']},
audioFile: '<unknown>',
instructions: '<string>',
urls: {
view: 'https://example.com/path/to/object',
manage: 'https://example.com/path/to/object',
invite: 'https://example.com/path/to/object',
translate: 'https://example.com/path/to/object'
},
files: [{name: '<string>', files: '<unknown>'}],
uses: {items: ['<string>'], details: {}},
dcp: {items: ['<string>'], details: {}},
recipients: {},
shippingAddresses: {},
project: '507f1f77bcf86cd799439011',
studio: '507f1f77bcf86cd799439011',
estimate: {
base: {
graphics: 123,
narration: 123,
scripts: 123,
dubbing: 123,
subtitling: 123,
hybrid: 123,
encoding: 123,
autosubs: 123,
autogfx: 123
},
applied: {
graphics: 123,
narration: 123,
scripts: 123,
dubbing: 123,
subtitling: 123,
hybrid: 123,
encoding: 123,
autosubs: 123,
autogfx: 123,
files: 123,
total: 123
}
},
materials: [
{
name: '<string>',
complete: true,
approved: true,
files: [
{
id: '<string>',
url: 'https://example.com/path/to/object',
name: '<string>',
uploadedAt: 123,
rootId: '<string>',
version: 123,
isCurrentVersion: true,
previousVersionId: '<unknown>'
}
],
changeRequests: [
{
id: '<string>',
_id: '<string>',
_optimistic: true,
fileId: '<string>',
body: JSON.stringify('<string>'),
status: '<string>',
user: {_id: '507f1f77bcf86cd799439011', name: '<string>', email: 'user@example.com'},
requestedBy: {_id: '507f1f77bcf86cd799439011', email: 'user@example.com'},
requestedAt: 123,
created: 123,
replies: [
{
id: '<string>',
_id: '<string>',
_optimistic: true,
replyTo: '<string>',
body: JSON.stringify('<string>'),
user: {_id: '507f1f77bcf86cd799439011', name: '<string>', email: 'user@example.com'},
created: 123,
editedAt: 123
}
],
editedAt: 123
}
]
}
],
rejections: '<unknown>',
history: [
{
date: 123,
user: {
_id: '507f1f77bcf86cd799439011',
emailNormal: 'user@example.com',
name: '<string>',
groups: [{_id: '507f1f77bcf86cd799439011', name: '<string>'}]
},
status: '<string>',
reason: '<string>'
}
],
reason: '<string>',
graphicsTranslation: '507f1f77bcf86cd799439011',
translation: '507f1f77bcf86cd799439011',
tags: '<unknown>'
},
projects: [{_id: '507f1f77bcf86cd799439011', name: '<string>', slug: '<string>'}],
assets: [
{
_id: '507f1f77bcf86cd799439011',
name: '<string>',
project: '507f1f77bcf86cd799439011',
type: '<string>',
notifyUrl: 'https://example.com/path/to/object'
}
],
urls: {
view: 'https://example.com/path/to/object',
manage: 'https://example.com/path/to/object',
invite: 'https://example.com/path/to/object',
translate: 'https://example.com/path/to/object'
},
assetTypes: ['<string>']
},
type: '<string>',
title: '<string>',
emailSubject: '<string>',
read: true,
viewed: true,
sent: true,
added: 123,
created: 123,
$links: {self: '//example.com/path/to/object'}
})
};
fetch('https://api-staging.pixwel.com/api/notifications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.pixwel.com/api/notifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'_id' => '507f1f77bcf86cd799439011',
'from' => '507f1f77bcf86cd799439011',
'to' => '507f1f77bcf86cd799439011',
'event' => [
'_id' => '507f1f77bcf86cd799439011',
'processed' => true,
'pushed' => true,
'digested' => true,
'created' => 123,
'body' => '<string>',
'graphicsFile' => [
'id' => '<string>',
'url' => 'https://example.com/path/to/object',
'name' => '<string>',
'rootId' => '<string>',
'version' => 123
],
'graphicsComment' => [
'id' => '<string>',
'replyTo' => '<string>',
'body' => '<string>',
'user' => [
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'email' => 'user@example.com'
],
'created' => 123,
'fileId' => '<string>'
],
'notify' => [
'users' => [
'507f1f77bcf86cd799439011'
],
'groups' => [
'507f1f77bcf86cd799439011'
]
],
'from' => [
'_id' => '507f1f77bcf86cd799439011',
'status' => [
'invited' => true,
'approved' => true,
'registered' => true,
'confirmed' => true
],
'invite' => 'https://example.com/path/to/object',
'name' => '<string>',
'username' => 'user@example.com',
'emailNormal' => 'user@example.com'
],
'type' => '<string>',
'workRequest' => [
'_id' => '507f1f77bcf86cd799439011',
'auto' => true,
'autosubs' => true,
'dualLanguages' => true,
'aspectRatio' => '<string>',
'status' => '<string>',
'from' => '507f1f77bcf86cd799439011',
'asset' => '507f1f77bcf86cd799439011',
'assetType' => '<string>',
'assetCategory' => '<string>',
'due' => [
'date' => 123,
'tz' => '<string>'
],
'deliveryDeadline' => [
'date' => 123,
'tz' => '<string>'
],
'autoMode' => true,
'language' => '<string>',
'territory' => '<string>',
'dng' => [
'dialogue' => [
'<string>'
],
'graphics' => [
'<string>'
],
'narration' => [
'<string>'
]
],
'audioFile' => '<unknown>',
'instructions' => '<string>',
'urls' => [
'view' => 'https://example.com/path/to/object',
'manage' => 'https://example.com/path/to/object',
'invite' => 'https://example.com/path/to/object',
'translate' => 'https://example.com/path/to/object'
],
'files' => [
[
'name' => '<string>',
'files' => '<unknown>'
]
],
'uses' => [
'items' => [
'<string>'
],
'details' => [
]
],
'dcp' => [
'items' => [
'<string>'
],
'details' => [
]
],
'recipients' => [
],
'shippingAddresses' => [
],
'project' => '507f1f77bcf86cd799439011',
'studio' => '507f1f77bcf86cd799439011',
'estimate' => [
'base' => [
'graphics' => 123,
'narration' => 123,
'scripts' => 123,
'dubbing' => 123,
'subtitling' => 123,
'hybrid' => 123,
'encoding' => 123,
'autosubs' => 123,
'autogfx' => 123
],
'applied' => [
'graphics' => 123,
'narration' => 123,
'scripts' => 123,
'dubbing' => 123,
'subtitling' => 123,
'hybrid' => 123,
'encoding' => 123,
'autosubs' => 123,
'autogfx' => 123,
'files' => 123,
'total' => 123
]
],
'materials' => [
[
'name' => '<string>',
'complete' => true,
'approved' => true,
'files' => [
[
'id' => '<string>',
'url' => 'https://example.com/path/to/object',
'name' => '<string>',
'uploadedAt' => 123,
'rootId' => '<string>',
'version' => 123,
'isCurrentVersion' => true,
'previousVersionId' => '<unknown>'
]
],
'changeRequests' => [
[
'id' => '<string>',
'_id' => '<string>',
'_optimistic' => true,
'fileId' => '<string>',
'body' => '<string>',
'status' => '<string>',
'user' => [
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'email' => 'user@example.com'
],
'requestedBy' => [
'_id' => '507f1f77bcf86cd799439011',
'email' => 'user@example.com'
],
'requestedAt' => 123,
'created' => 123,
'replies' => [
[
'id' => '<string>',
'_id' => '<string>',
'_optimistic' => true,
'replyTo' => '<string>',
'body' => '<string>',
'user' => [
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'email' => 'user@example.com'
],
'created' => 123,
'editedAt' => 123
]
],
'editedAt' => 123
]
]
]
],
'rejections' => '<unknown>',
'history' => [
[
'date' => 123,
'user' => [
'_id' => '507f1f77bcf86cd799439011',
'emailNormal' => 'user@example.com',
'name' => '<string>',
'groups' => [
[
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>'
]
]
],
'status' => '<string>',
'reason' => '<string>'
]
],
'reason' => '<string>',
'graphicsTranslation' => '507f1f77bcf86cd799439011',
'translation' => '507f1f77bcf86cd799439011',
'tags' => '<unknown>'
],
'projects' => [
[
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'slug' => '<string>'
]
],
'assets' => [
[
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'project' => '507f1f77bcf86cd799439011',
'type' => '<string>',
'notifyUrl' => 'https://example.com/path/to/object'
]
],
'urls' => [
'view' => 'https://example.com/path/to/object',
'manage' => 'https://example.com/path/to/object',
'invite' => 'https://example.com/path/to/object',
'translate' => 'https://example.com/path/to/object'
],
'assetTypes' => [
'<string>'
]
],
'type' => '<string>',
'title' => '<string>',
'emailSubject' => '<string>',
'read' => true,
'viewed' => true,
'sent' => true,
'added' => 123,
'created' => 123,
'$links' => [
'self' => '//example.com/path/to/object'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-staging.pixwel.com/api/notifications"
payload := strings.NewReader("{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"from\": \"507f1f77bcf86cd799439011\",\n \"to\": \"507f1f77bcf86cd799439011\",\n \"event\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"processed\": true,\n \"pushed\": true,\n \"digested\": true,\n \"created\": 123,\n \"body\": \"<string>\",\n \"graphicsFile\": {\n \"id\": \"<string>\",\n \"url\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"rootId\": \"<string>\",\n \"version\": 123\n },\n \"graphicsComment\": {\n \"id\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"body\": \"<string>\",\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"email\": \"user@example.com\"\n },\n \"created\": 123,\n \"fileId\": \"<string>\"\n },\n \"notify\": {\n \"users\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"groups\": [\n \"507f1f77bcf86cd799439011\"\n ]\n },\n \"from\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"status\": {\n \"invited\": true,\n \"approved\": true,\n \"registered\": true,\n \"confirmed\": true\n },\n \"invite\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"username\": \"user@example.com\",\n \"emailNormal\": \"user@example.com\"\n },\n \"type\": \"<string>\",\n \"workRequest\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"auto\": true,\n \"autosubs\": true,\n \"dualLanguages\": true,\n \"aspectRatio\": \"<string>\",\n \"status\": \"<string>\",\n \"from\": \"507f1f77bcf86cd799439011\",\n \"asset\": \"507f1f77bcf86cd799439011\",\n \"assetType\": \"<string>\",\n \"assetCategory\": \"<string>\",\n \"due\": {\n \"date\": 123,\n \"tz\": \"<string>\"\n },\n \"deliveryDeadline\": {\n \"date\": 123,\n \"tz\": \"<string>\"\n },\n \"autoMode\": true,\n \"language\": \"<string>\",\n \"territory\": \"<string>\",\n \"dng\": {\n \"dialogue\": [\n \"<string>\"\n ],\n \"graphics\": [\n \"<string>\"\n ],\n \"narration\": [\n \"<string>\"\n ]\n },\n \"audioFile\": \"<unknown>\",\n \"instructions\": \"<string>\",\n \"urls\": {\n \"view\": \"https://example.com/path/to/object\",\n \"manage\": \"https://example.com/path/to/object\",\n \"invite\": \"https://example.com/path/to/object\",\n \"translate\": \"https://example.com/path/to/object\"\n },\n \"files\": [\n {\n \"name\": \"<string>\",\n \"files\": \"<unknown>\"\n }\n ],\n \"uses\": {\n \"items\": [\n \"<string>\"\n ],\n \"details\": {}\n },\n \"dcp\": {\n \"items\": [\n \"<string>\"\n ],\n \"details\": {}\n },\n \"recipients\": {},\n \"shippingAddresses\": {},\n \"project\": \"507f1f77bcf86cd799439011\",\n \"studio\": \"507f1f77bcf86cd799439011\",\n \"estimate\": {\n \"base\": {\n \"graphics\": 123,\n \"narration\": 123,\n \"scripts\": 123,\n \"dubbing\": 123,\n \"subtitling\": 123,\n \"hybrid\": 123,\n \"encoding\": 123,\n \"autosubs\": 123,\n \"autogfx\": 123\n },\n \"applied\": {\n \"graphics\": 123,\n \"narration\": 123,\n \"scripts\": 123,\n \"dubbing\": 123,\n \"subtitling\": 123,\n \"hybrid\": 123,\n \"encoding\": 123,\n \"autosubs\": 123,\n \"autogfx\": 123,\n \"files\": 123,\n \"total\": 123\n }\n },\n \"materials\": [\n {\n \"name\": \"<string>\",\n \"complete\": true,\n \"approved\": true,\n \"files\": [\n {\n \"id\": \"<string>\",\n \"url\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"uploadedAt\": 123,\n \"rootId\": \"<string>\",\n \"version\": 123,\n \"isCurrentVersion\": true,\n \"previousVersionId\": \"<unknown>\"\n }\n ],\n \"changeRequests\": [\n {\n \"id\": \"<string>\",\n \"_id\": \"<string>\",\n \"_optimistic\": true,\n \"fileId\": \"<string>\",\n \"body\": \"<string>\",\n \"status\": \"<string>\",\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"email\": \"user@example.com\"\n },\n \"requestedBy\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"email\": \"user@example.com\"\n },\n \"requestedAt\": 123,\n \"created\": 123,\n \"replies\": [\n {\n \"id\": \"<string>\",\n \"_id\": \"<string>\",\n \"_optimistic\": true,\n \"replyTo\": \"<string>\",\n \"body\": \"<string>\",\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"email\": \"user@example.com\"\n },\n \"created\": 123,\n \"editedAt\": 123\n }\n ],\n \"editedAt\": 123\n }\n ]\n }\n ],\n \"rejections\": \"<unknown>\",\n \"history\": [\n {\n \"date\": 123,\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"emailNormal\": \"user@example.com\",\n \"name\": \"<string>\",\n \"groups\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\"\n }\n ]\n },\n \"status\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ],\n \"reason\": \"<string>\",\n \"graphicsTranslation\": \"507f1f77bcf86cd799439011\",\n \"translation\": \"507f1f77bcf86cd799439011\",\n \"tags\": \"<unknown>\"\n },\n \"projects\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\"\n }\n ],\n \"assets\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"project\": \"507f1f77bcf86cd799439011\",\n \"type\": \"<string>\",\n \"notifyUrl\": \"https://example.com/path/to/object\"\n }\n ],\n \"urls\": {\n \"view\": \"https://example.com/path/to/object\",\n \"manage\": \"https://example.com/path/to/object\",\n \"invite\": \"https://example.com/path/to/object\",\n \"translate\": \"https://example.com/path/to/object\"\n },\n \"assetTypes\": [\n \"<string>\"\n ]\n },\n \"type\": \"<string>\",\n \"title\": \"<string>\",\n \"emailSubject\": \"<string>\",\n \"read\": true,\n \"viewed\": true,\n \"sent\": true,\n \"added\": 123,\n \"created\": 123,\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api-staging.pixwel.com/api/notifications")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"from\": \"507f1f77bcf86cd799439011\",\n \"to\": \"507f1f77bcf86cd799439011\",\n \"event\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"processed\": true,\n \"pushed\": true,\n \"digested\": true,\n \"created\": 123,\n \"body\": \"<string>\",\n \"graphicsFile\": {\n \"id\": \"<string>\",\n \"url\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"rootId\": \"<string>\",\n \"version\": 123\n },\n \"graphicsComment\": {\n \"id\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"body\": \"<string>\",\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"email\": \"user@example.com\"\n },\n \"created\": 123,\n \"fileId\": \"<string>\"\n },\n \"notify\": {\n \"users\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"groups\": [\n \"507f1f77bcf86cd799439011\"\n ]\n },\n \"from\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"status\": {\n \"invited\": true,\n \"approved\": true,\n \"registered\": true,\n \"confirmed\": true\n },\n \"invite\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"username\": \"user@example.com\",\n \"emailNormal\": \"user@example.com\"\n },\n \"type\": \"<string>\",\n \"workRequest\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"auto\": true,\n \"autosubs\": true,\n \"dualLanguages\": true,\n \"aspectRatio\": \"<string>\",\n \"status\": \"<string>\",\n \"from\": \"507f1f77bcf86cd799439011\",\n \"asset\": \"507f1f77bcf86cd799439011\",\n \"assetType\": \"<string>\",\n \"assetCategory\": \"<string>\",\n \"due\": {\n \"date\": 123,\n \"tz\": \"<string>\"\n },\n \"deliveryDeadline\": {\n \"date\": 123,\n \"tz\": \"<string>\"\n },\n \"autoMode\": true,\n \"language\": \"<string>\",\n \"territory\": \"<string>\",\n \"dng\": {\n \"dialogue\": [\n \"<string>\"\n ],\n \"graphics\": [\n \"<string>\"\n ],\n \"narration\": [\n \"<string>\"\n ]\n },\n \"audioFile\": \"<unknown>\",\n \"instructions\": \"<string>\",\n \"urls\": {\n \"view\": \"https://example.com/path/to/object\",\n \"manage\": \"https://example.com/path/to/object\",\n \"invite\": \"https://example.com/path/to/object\",\n \"translate\": \"https://example.com/path/to/object\"\n },\n \"files\": [\n {\n \"name\": \"<string>\",\n \"files\": \"<unknown>\"\n }\n ],\n \"uses\": {\n \"items\": [\n \"<string>\"\n ],\n \"details\": {}\n },\n \"dcp\": {\n \"items\": [\n \"<string>\"\n ],\n \"details\": {}\n },\n \"recipients\": {},\n \"shippingAddresses\": {},\n \"project\": \"507f1f77bcf86cd799439011\",\n \"studio\": \"507f1f77bcf86cd799439011\",\n \"estimate\": {\n \"base\": {\n \"graphics\": 123,\n \"narration\": 123,\n \"scripts\": 123,\n \"dubbing\": 123,\n \"subtitling\": 123,\n \"hybrid\": 123,\n \"encoding\": 123,\n \"autosubs\": 123,\n \"autogfx\": 123\n },\n \"applied\": {\n \"graphics\": 123,\n \"narration\": 123,\n \"scripts\": 123,\n \"dubbing\": 123,\n \"subtitling\": 123,\n \"hybrid\": 123,\n \"encoding\": 123,\n \"autosubs\": 123,\n \"autogfx\": 123,\n \"files\": 123,\n \"total\": 123\n }\n },\n \"materials\": [\n {\n \"name\": \"<string>\",\n \"complete\": true,\n \"approved\": true,\n \"files\": [\n {\n \"id\": \"<string>\",\n \"url\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"uploadedAt\": 123,\n \"rootId\": \"<string>\",\n \"version\": 123,\n \"isCurrentVersion\": true,\n \"previousVersionId\": \"<unknown>\"\n }\n ],\n \"changeRequests\": [\n {\n \"id\": \"<string>\",\n \"_id\": \"<string>\",\n \"_optimistic\": true,\n \"fileId\": \"<string>\",\n \"body\": \"<string>\",\n \"status\": \"<string>\",\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"email\": \"user@example.com\"\n },\n \"requestedBy\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"email\": \"user@example.com\"\n },\n \"requestedAt\": 123,\n \"created\": 123,\n \"replies\": [\n {\n \"id\": \"<string>\",\n \"_id\": \"<string>\",\n \"_optimistic\": true,\n \"replyTo\": \"<string>\",\n \"body\": \"<string>\",\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"email\": \"user@example.com\"\n },\n \"created\": 123,\n \"editedAt\": 123\n }\n ],\n \"editedAt\": 123\n }\n ]\n }\n ],\n \"rejections\": \"<unknown>\",\n \"history\": [\n {\n \"date\": 123,\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"emailNormal\": \"user@example.com\",\n \"name\": \"<string>\",\n \"groups\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\"\n }\n ]\n },\n \"status\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ],\n \"reason\": \"<string>\",\n \"graphicsTranslation\": \"507f1f77bcf86cd799439011\",\n \"translation\": \"507f1f77bcf86cd799439011\",\n \"tags\": \"<unknown>\"\n },\n \"projects\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\"\n }\n ],\n \"assets\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"project\": \"507f1f77bcf86cd799439011\",\n \"type\": \"<string>\",\n \"notifyUrl\": \"https://example.com/path/to/object\"\n }\n ],\n \"urls\": {\n \"view\": \"https://example.com/path/to/object\",\n \"manage\": \"https://example.com/path/to/object\",\n \"invite\": \"https://example.com/path/to/object\",\n \"translate\": \"https://example.com/path/to/object\"\n },\n \"assetTypes\": [\n \"<string>\"\n ]\n },\n \"type\": \"<string>\",\n \"title\": \"<string>\",\n \"emailSubject\": \"<string>\",\n \"read\": true,\n \"viewed\": true,\n \"sent\": true,\n \"added\": 123,\n \"created\": 123,\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.pixwel.com/api/notifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"from\": \"507f1f77bcf86cd799439011\",\n \"to\": \"507f1f77bcf86cd799439011\",\n \"event\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"processed\": true,\n \"pushed\": true,\n \"digested\": true,\n \"created\": 123,\n \"body\": \"<string>\",\n \"graphicsFile\": {\n \"id\": \"<string>\",\n \"url\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"rootId\": \"<string>\",\n \"version\": 123\n },\n \"graphicsComment\": {\n \"id\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"body\": \"<string>\",\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"email\": \"user@example.com\"\n },\n \"created\": 123,\n \"fileId\": \"<string>\"\n },\n \"notify\": {\n \"users\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"groups\": [\n \"507f1f77bcf86cd799439011\"\n ]\n },\n \"from\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"status\": {\n \"invited\": true,\n \"approved\": true,\n \"registered\": true,\n \"confirmed\": true\n },\n \"invite\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"username\": \"user@example.com\",\n \"emailNormal\": \"user@example.com\"\n },\n \"type\": \"<string>\",\n \"workRequest\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"auto\": true,\n \"autosubs\": true,\n \"dualLanguages\": true,\n \"aspectRatio\": \"<string>\",\n \"status\": \"<string>\",\n \"from\": \"507f1f77bcf86cd799439011\",\n \"asset\": \"507f1f77bcf86cd799439011\",\n \"assetType\": \"<string>\",\n \"assetCategory\": \"<string>\",\n \"due\": {\n \"date\": 123,\n \"tz\": \"<string>\"\n },\n \"deliveryDeadline\": {\n \"date\": 123,\n \"tz\": \"<string>\"\n },\n \"autoMode\": true,\n \"language\": \"<string>\",\n \"territory\": \"<string>\",\n \"dng\": {\n \"dialogue\": [\n \"<string>\"\n ],\n \"graphics\": [\n \"<string>\"\n ],\n \"narration\": [\n \"<string>\"\n ]\n },\n \"audioFile\": \"<unknown>\",\n \"instructions\": \"<string>\",\n \"urls\": {\n \"view\": \"https://example.com/path/to/object\",\n \"manage\": \"https://example.com/path/to/object\",\n \"invite\": \"https://example.com/path/to/object\",\n \"translate\": \"https://example.com/path/to/object\"\n },\n \"files\": [\n {\n \"name\": \"<string>\",\n \"files\": \"<unknown>\"\n }\n ],\n \"uses\": {\n \"items\": [\n \"<string>\"\n ],\n \"details\": {}\n },\n \"dcp\": {\n \"items\": [\n \"<string>\"\n ],\n \"details\": {}\n },\n \"recipients\": {},\n \"shippingAddresses\": {},\n \"project\": \"507f1f77bcf86cd799439011\",\n \"studio\": \"507f1f77bcf86cd799439011\",\n \"estimate\": {\n \"base\": {\n \"graphics\": 123,\n \"narration\": 123,\n \"scripts\": 123,\n \"dubbing\": 123,\n \"subtitling\": 123,\n \"hybrid\": 123,\n \"encoding\": 123,\n \"autosubs\": 123,\n \"autogfx\": 123\n },\n \"applied\": {\n \"graphics\": 123,\n \"narration\": 123,\n \"scripts\": 123,\n \"dubbing\": 123,\n \"subtitling\": 123,\n \"hybrid\": 123,\n \"encoding\": 123,\n \"autosubs\": 123,\n \"autogfx\": 123,\n \"files\": 123,\n \"total\": 123\n }\n },\n \"materials\": [\n {\n \"name\": \"<string>\",\n \"complete\": true,\n \"approved\": true,\n \"files\": [\n {\n \"id\": \"<string>\",\n \"url\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"uploadedAt\": 123,\n \"rootId\": \"<string>\",\n \"version\": 123,\n \"isCurrentVersion\": true,\n \"previousVersionId\": \"<unknown>\"\n }\n ],\n \"changeRequests\": [\n {\n \"id\": \"<string>\",\n \"_id\": \"<string>\",\n \"_optimistic\": true,\n \"fileId\": \"<string>\",\n \"body\": \"<string>\",\n \"status\": \"<string>\",\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"email\": \"user@example.com\"\n },\n \"requestedBy\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"email\": \"user@example.com\"\n },\n \"requestedAt\": 123,\n \"created\": 123,\n \"replies\": [\n {\n \"id\": \"<string>\",\n \"_id\": \"<string>\",\n \"_optimistic\": true,\n \"replyTo\": \"<string>\",\n \"body\": \"<string>\",\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"email\": \"user@example.com\"\n },\n \"created\": 123,\n \"editedAt\": 123\n }\n ],\n \"editedAt\": 123\n }\n ]\n }\n ],\n \"rejections\": \"<unknown>\",\n \"history\": [\n {\n \"date\": 123,\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"emailNormal\": \"user@example.com\",\n \"name\": \"<string>\",\n \"groups\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\"\n }\n ]\n },\n \"status\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ],\n \"reason\": \"<string>\",\n \"graphicsTranslation\": \"507f1f77bcf86cd799439011\",\n \"translation\": \"507f1f77bcf86cd799439011\",\n \"tags\": \"<unknown>\"\n },\n \"projects\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\"\n }\n ],\n \"assets\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"project\": \"507f1f77bcf86cd799439011\",\n \"type\": \"<string>\",\n \"notifyUrl\": \"https://example.com/path/to/object\"\n }\n ],\n \"urls\": {\n \"view\": \"https://example.com/path/to/object\",\n \"manage\": \"https://example.com/path/to/object\",\n \"invite\": \"https://example.com/path/to/object\",\n \"translate\": \"https://example.com/path/to/object\"\n },\n \"assetTypes\": [\n \"<string>\"\n ]\n },\n \"type\": \"<string>\",\n \"title\": \"<string>\",\n \"emailSubject\": \"<string>\",\n \"read\": true,\n \"viewed\": true,\n \"sent\": true,\n \"added\": 123,\n \"created\": 123,\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n}"
response = http.request(request)
puts response.read_body{
"_id": "507f1f77bcf86cd799439011",
"from": "507f1f77bcf86cd799439011",
"to": "507f1f77bcf86cd799439011",
"event": {
"_id": "507f1f77bcf86cd799439011",
"processed": true,
"pushed": true,
"digested": true,
"created": 123,
"body": "<string>",
"graphicsFile": {
"id": "<string>",
"url": "https://example.com/path/to/object",
"name": "<string>",
"rootId": "<string>",
"version": 123
},
"graphicsComment": {
"id": "<string>",
"replyTo": "<string>",
"body": "<string>",
"user": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"email": "user@example.com"
},
"created": 123,
"fileId": "<string>"
},
"notify": {
"users": [
"507f1f77bcf86cd799439011"
],
"groups": [
"507f1f77bcf86cd799439011"
]
},
"from": {
"_id": "507f1f77bcf86cd799439011",
"status": {
"invited": true,
"approved": true,
"registered": true,
"confirmed": true
},
"invite": "https://example.com/path/to/object",
"name": "<string>",
"username": "user@example.com",
"emailNormal": "user@example.com"
},
"type": "<string>",
"workRequest": {
"_id": "507f1f77bcf86cd799439011",
"auto": true,
"autosubs": true,
"dualLanguages": true,
"aspectRatio": "<string>",
"status": "<string>",
"from": "507f1f77bcf86cd799439011",
"asset": "507f1f77bcf86cd799439011",
"assetType": "<string>",
"assetCategory": "<string>",
"due": {
"date": 123,
"tz": "<string>"
},
"deliveryDeadline": {
"date": 123,
"tz": "<string>"
},
"autoMode": true,
"language": "<string>",
"territory": "<string>",
"dng": {
"dialogue": [
"<string>"
],
"graphics": [
"<string>"
],
"narration": [
"<string>"
]
},
"audioFile": "<unknown>",
"instructions": "<string>",
"urls": {
"view": "https://example.com/path/to/object",
"manage": "https://example.com/path/to/object",
"invite": "https://example.com/path/to/object",
"translate": "https://example.com/path/to/object"
},
"files": [
{
"name": "<string>",
"files": "<unknown>"
}
],
"uses": {
"items": [
"<string>"
],
"details": {}
},
"dcp": {
"items": [
"<string>"
],
"details": {}
},
"recipients": {},
"shippingAddresses": {},
"project": "507f1f77bcf86cd799439011",
"studio": "507f1f77bcf86cd799439011",
"estimate": {
"base": {
"graphics": 123,
"narration": 123,
"scripts": 123,
"dubbing": 123,
"subtitling": 123,
"hybrid": 123,
"encoding": 123,
"autosubs": 123,
"autogfx": 123
},
"applied": {
"graphics": 123,
"narration": 123,
"scripts": 123,
"dubbing": 123,
"subtitling": 123,
"hybrid": 123,
"encoding": 123,
"autosubs": 123,
"autogfx": 123,
"files": 123,
"total": 123
}
},
"materials": [
{
"name": "<string>",
"complete": true,
"approved": true,
"files": [
{
"id": "<string>",
"url": "https://example.com/path/to/object",
"name": "<string>",
"uploadedAt": 123,
"rootId": "<string>",
"version": 123,
"isCurrentVersion": true,
"previousVersionId": "<unknown>"
}
],
"changeRequests": [
{
"id": "<string>",
"_id": "<string>",
"_optimistic": true,
"fileId": "<string>",
"body": "<string>",
"status": "<string>",
"user": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"email": "user@example.com"
},
"requestedBy": {
"_id": "507f1f77bcf86cd799439011",
"email": "user@example.com"
},
"requestedAt": 123,
"created": 123,
"replies": [
{
"id": "<string>",
"_id": "<string>",
"_optimistic": true,
"replyTo": "<string>",
"body": "<string>",
"user": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"email": "user@example.com"
},
"created": 123,
"editedAt": 123
}
],
"editedAt": 123
}
]
}
],
"rejections": "<unknown>",
"history": [
{
"date": 123,
"user": {
"_id": "507f1f77bcf86cd799439011",
"emailNormal": "user@example.com",
"name": "<string>",
"groups": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>"
}
]
},
"status": "<string>",
"reason": "<string>"
}
],
"reason": "<string>",
"graphicsTranslation": "507f1f77bcf86cd799439011",
"translation": "507f1f77bcf86cd799439011",
"tags": "<unknown>"
},
"projects": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"slug": "<string>"
}
],
"assets": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"project": "507f1f77bcf86cd799439011",
"type": "<string>",
"notifyUrl": "https://example.com/path/to/object"
}
],
"urls": {
"view": "https://example.com/path/to/object",
"manage": "https://example.com/path/to/object",
"invite": "https://example.com/path/to/object",
"translate": "https://example.com/path/to/object"
},
"assetTypes": [
"<string>"
]
},
"type": "<string>",
"title": "<string>",
"emailSubject": "<string>",
"read": true,
"viewed": true,
"sent": true,
"added": 123,
"created": 123,
"$links": {
"self": "//example.com/path/to/object"
}
}Notifications
Update notifications
PATCH
/
notifications
Update notifications
curl --request PATCH \
--url https://api-staging.pixwel.com/api/notifications \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"_id": "507f1f77bcf86cd799439011",
"from": "507f1f77bcf86cd799439011",
"to": "507f1f77bcf86cd799439011",
"event": {
"_id": "507f1f77bcf86cd799439011",
"processed": true,
"pushed": true,
"digested": true,
"created": 123,
"body": "<string>",
"graphicsFile": {
"id": "<string>",
"url": "https://example.com/path/to/object",
"name": "<string>",
"rootId": "<string>",
"version": 123
},
"graphicsComment": {
"id": "<string>",
"replyTo": "<string>",
"body": "<string>",
"user": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"email": "user@example.com"
},
"created": 123,
"fileId": "<string>"
},
"notify": {
"users": [
"507f1f77bcf86cd799439011"
],
"groups": [
"507f1f77bcf86cd799439011"
]
},
"from": {
"_id": "507f1f77bcf86cd799439011",
"status": {
"invited": true,
"approved": true,
"registered": true,
"confirmed": true
},
"invite": "https://example.com/path/to/object",
"name": "<string>",
"username": "user@example.com",
"emailNormal": "user@example.com"
},
"type": "<string>",
"workRequest": {
"_id": "507f1f77bcf86cd799439011",
"auto": true,
"autosubs": true,
"dualLanguages": true,
"aspectRatio": "<string>",
"status": "<string>",
"from": "507f1f77bcf86cd799439011",
"asset": "507f1f77bcf86cd799439011",
"assetType": "<string>",
"assetCategory": "<string>",
"due": {
"date": 123,
"tz": "<string>"
},
"deliveryDeadline": {
"date": 123,
"tz": "<string>"
},
"autoMode": true,
"language": "<string>",
"territory": "<string>",
"dng": {
"dialogue": [
"<string>"
],
"graphics": [
"<string>"
],
"narration": [
"<string>"
]
},
"audioFile": "<unknown>",
"instructions": "<string>",
"urls": {
"view": "https://example.com/path/to/object",
"manage": "https://example.com/path/to/object",
"invite": "https://example.com/path/to/object",
"translate": "https://example.com/path/to/object"
},
"files": [
{
"name": "<string>",
"files": "<unknown>"
}
],
"uses": {
"items": [
"<string>"
],
"details": {}
},
"dcp": {
"items": [
"<string>"
],
"details": {}
},
"recipients": {},
"shippingAddresses": {},
"project": "507f1f77bcf86cd799439011",
"studio": "507f1f77bcf86cd799439011",
"estimate": {
"base": {
"graphics": 123,
"narration": 123,
"scripts": 123,
"dubbing": 123,
"subtitling": 123,
"hybrid": 123,
"encoding": 123,
"autosubs": 123,
"autogfx": 123
},
"applied": {
"graphics": 123,
"narration": 123,
"scripts": 123,
"dubbing": 123,
"subtitling": 123,
"hybrid": 123,
"encoding": 123,
"autosubs": 123,
"autogfx": 123,
"files": 123,
"total": 123
}
},
"materials": [
{
"name": "<string>",
"complete": true,
"approved": true,
"files": [
{
"id": "<string>",
"url": "https://example.com/path/to/object",
"name": "<string>",
"uploadedAt": 123,
"rootId": "<string>",
"version": 123,
"isCurrentVersion": true,
"previousVersionId": "<unknown>"
}
],
"changeRequests": [
{
"id": "<string>",
"_id": "<string>",
"_optimistic": true,
"fileId": "<string>",
"body": "<string>",
"status": "<string>",
"user": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"email": "user@example.com"
},
"requestedBy": {
"_id": "507f1f77bcf86cd799439011",
"email": "user@example.com"
},
"requestedAt": 123,
"created": 123,
"replies": [
{
"id": "<string>",
"_id": "<string>",
"_optimistic": true,
"replyTo": "<string>",
"body": "<string>",
"user": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"email": "user@example.com"
},
"created": 123,
"editedAt": 123
}
],
"editedAt": 123
}
]
}
],
"rejections": "<unknown>",
"history": [
{
"date": 123,
"user": {
"_id": "507f1f77bcf86cd799439011",
"emailNormal": "user@example.com",
"name": "<string>",
"groups": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>"
}
]
},
"status": "<string>",
"reason": "<string>"
}
],
"reason": "<string>",
"graphicsTranslation": "507f1f77bcf86cd799439011",
"translation": "507f1f77bcf86cd799439011",
"tags": "<unknown>"
},
"projects": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"slug": "<string>"
}
],
"assets": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"project": "507f1f77bcf86cd799439011",
"type": "<string>",
"notifyUrl": "https://example.com/path/to/object"
}
],
"urls": {
"view": "https://example.com/path/to/object",
"manage": "https://example.com/path/to/object",
"invite": "https://example.com/path/to/object",
"translate": "https://example.com/path/to/object"
},
"assetTypes": [
"<string>"
]
},
"type": "<string>",
"title": "<string>",
"emailSubject": "<string>",
"read": true,
"viewed": true,
"sent": true,
"added": 123,
"created": 123,
"$links": {
"self": "//example.com/path/to/object"
}
}
'import requests
url = "https://api-staging.pixwel.com/api/notifications"
payload = {
"_id": "507f1f77bcf86cd799439011",
"from": "507f1f77bcf86cd799439011",
"to": "507f1f77bcf86cd799439011",
"event": {
"_id": "507f1f77bcf86cd799439011",
"processed": True,
"pushed": True,
"digested": True,
"created": 123,
"body": "<string>",
"graphicsFile": {
"id": "<string>",
"url": "https://example.com/path/to/object",
"name": "<string>",
"rootId": "<string>",
"version": 123
},
"graphicsComment": {
"id": "<string>",
"replyTo": "<string>",
"body": "<string>",
"user": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"email": "user@example.com"
},
"created": 123,
"fileId": "<string>"
},
"notify": {
"users": ["507f1f77bcf86cd799439011"],
"groups": ["507f1f77bcf86cd799439011"]
},
"from": {
"_id": "507f1f77bcf86cd799439011",
"status": {
"invited": True,
"approved": True,
"registered": True,
"confirmed": True
},
"invite": "https://example.com/path/to/object",
"name": "<string>",
"username": "user@example.com",
"emailNormal": "user@example.com"
},
"type": "<string>",
"workRequest": {
"_id": "507f1f77bcf86cd799439011",
"auto": True,
"autosubs": True,
"dualLanguages": True,
"aspectRatio": "<string>",
"status": "<string>",
"from": "507f1f77bcf86cd799439011",
"asset": "507f1f77bcf86cd799439011",
"assetType": "<string>",
"assetCategory": "<string>",
"due": {
"date": 123,
"tz": "<string>"
},
"deliveryDeadline": {
"date": 123,
"tz": "<string>"
},
"autoMode": True,
"language": "<string>",
"territory": "<string>",
"dng": {
"dialogue": ["<string>"],
"graphics": ["<string>"],
"narration": ["<string>"]
},
"audioFile": "<unknown>",
"instructions": "<string>",
"urls": {
"view": "https://example.com/path/to/object",
"manage": "https://example.com/path/to/object",
"invite": "https://example.com/path/to/object",
"translate": "https://example.com/path/to/object"
},
"files": [
{
"name": "<string>",
"files": "<unknown>"
}
],
"uses": {
"items": ["<string>"],
"details": {}
},
"dcp": {
"items": ["<string>"],
"details": {}
},
"recipients": {},
"shippingAddresses": {},
"project": "507f1f77bcf86cd799439011",
"studio": "507f1f77bcf86cd799439011",
"estimate": {
"base": {
"graphics": 123,
"narration": 123,
"scripts": 123,
"dubbing": 123,
"subtitling": 123,
"hybrid": 123,
"encoding": 123,
"autosubs": 123,
"autogfx": 123
},
"applied": {
"graphics": 123,
"narration": 123,
"scripts": 123,
"dubbing": 123,
"subtitling": 123,
"hybrid": 123,
"encoding": 123,
"autosubs": 123,
"autogfx": 123,
"files": 123,
"total": 123
}
},
"materials": [
{
"name": "<string>",
"complete": True,
"approved": True,
"files": [
{
"id": "<string>",
"url": "https://example.com/path/to/object",
"name": "<string>",
"uploadedAt": 123,
"rootId": "<string>",
"version": 123,
"isCurrentVersion": True,
"previousVersionId": "<unknown>"
}
],
"changeRequests": [
{
"id": "<string>",
"_id": "<string>",
"_optimistic": True,
"fileId": "<string>",
"body": "<string>",
"status": "<string>",
"user": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"email": "user@example.com"
},
"requestedBy": {
"_id": "507f1f77bcf86cd799439011",
"email": "user@example.com"
},
"requestedAt": 123,
"created": 123,
"replies": [
{
"id": "<string>",
"_id": "<string>",
"_optimistic": True,
"replyTo": "<string>",
"body": "<string>",
"user": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"email": "user@example.com"
},
"created": 123,
"editedAt": 123
}
],
"editedAt": 123
}
]
}
],
"rejections": "<unknown>",
"history": [
{
"date": 123,
"user": {
"_id": "507f1f77bcf86cd799439011",
"emailNormal": "user@example.com",
"name": "<string>",
"groups": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>"
}
]
},
"status": "<string>",
"reason": "<string>"
}
],
"reason": "<string>",
"graphicsTranslation": "507f1f77bcf86cd799439011",
"translation": "507f1f77bcf86cd799439011",
"tags": "<unknown>"
},
"projects": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"slug": "<string>"
}
],
"assets": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"project": "507f1f77bcf86cd799439011",
"type": "<string>",
"notifyUrl": "https://example.com/path/to/object"
}
],
"urls": {
"view": "https://example.com/path/to/object",
"manage": "https://example.com/path/to/object",
"invite": "https://example.com/path/to/object",
"translate": "https://example.com/path/to/object"
},
"assetTypes": ["<string>"]
},
"type": "<string>",
"title": "<string>",
"emailSubject": "<string>",
"read": True,
"viewed": True,
"sent": True,
"added": 123,
"created": 123,
"$links": { "self": "//example.com/path/to/object" }
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_id: '507f1f77bcf86cd799439011',
from: '507f1f77bcf86cd799439011',
to: '507f1f77bcf86cd799439011',
event: {
_id: '507f1f77bcf86cd799439011',
processed: true,
pushed: true,
digested: true,
created: 123,
body: JSON.stringify('<string>'),
graphicsFile: {
id: '<string>',
url: 'https://example.com/path/to/object',
name: '<string>',
rootId: '<string>',
version: 123
},
graphicsComment: {
id: '<string>',
replyTo: '<string>',
body: JSON.stringify('<string>'),
user: {_id: '507f1f77bcf86cd799439011', name: '<string>', email: 'user@example.com'},
created: 123,
fileId: '<string>'
},
notify: {users: ['507f1f77bcf86cd799439011'], groups: ['507f1f77bcf86cd799439011']},
from: {
_id: '507f1f77bcf86cd799439011',
status: {invited: true, approved: true, registered: true, confirmed: true},
invite: 'https://example.com/path/to/object',
name: '<string>',
username: 'user@example.com',
emailNormal: 'user@example.com'
},
type: '<string>',
workRequest: {
_id: '507f1f77bcf86cd799439011',
auto: true,
autosubs: true,
dualLanguages: true,
aspectRatio: '<string>',
status: '<string>',
from: '507f1f77bcf86cd799439011',
asset: '507f1f77bcf86cd799439011',
assetType: '<string>',
assetCategory: '<string>',
due: {date: 123, tz: '<string>'},
deliveryDeadline: {date: 123, tz: '<string>'},
autoMode: true,
language: '<string>',
territory: '<string>',
dng: {dialogue: ['<string>'], graphics: ['<string>'], narration: ['<string>']},
audioFile: '<unknown>',
instructions: '<string>',
urls: {
view: 'https://example.com/path/to/object',
manage: 'https://example.com/path/to/object',
invite: 'https://example.com/path/to/object',
translate: 'https://example.com/path/to/object'
},
files: [{name: '<string>', files: '<unknown>'}],
uses: {items: ['<string>'], details: {}},
dcp: {items: ['<string>'], details: {}},
recipients: {},
shippingAddresses: {},
project: '507f1f77bcf86cd799439011',
studio: '507f1f77bcf86cd799439011',
estimate: {
base: {
graphics: 123,
narration: 123,
scripts: 123,
dubbing: 123,
subtitling: 123,
hybrid: 123,
encoding: 123,
autosubs: 123,
autogfx: 123
},
applied: {
graphics: 123,
narration: 123,
scripts: 123,
dubbing: 123,
subtitling: 123,
hybrid: 123,
encoding: 123,
autosubs: 123,
autogfx: 123,
files: 123,
total: 123
}
},
materials: [
{
name: '<string>',
complete: true,
approved: true,
files: [
{
id: '<string>',
url: 'https://example.com/path/to/object',
name: '<string>',
uploadedAt: 123,
rootId: '<string>',
version: 123,
isCurrentVersion: true,
previousVersionId: '<unknown>'
}
],
changeRequests: [
{
id: '<string>',
_id: '<string>',
_optimistic: true,
fileId: '<string>',
body: JSON.stringify('<string>'),
status: '<string>',
user: {_id: '507f1f77bcf86cd799439011', name: '<string>', email: 'user@example.com'},
requestedBy: {_id: '507f1f77bcf86cd799439011', email: 'user@example.com'},
requestedAt: 123,
created: 123,
replies: [
{
id: '<string>',
_id: '<string>',
_optimistic: true,
replyTo: '<string>',
body: JSON.stringify('<string>'),
user: {_id: '507f1f77bcf86cd799439011', name: '<string>', email: 'user@example.com'},
created: 123,
editedAt: 123
}
],
editedAt: 123
}
]
}
],
rejections: '<unknown>',
history: [
{
date: 123,
user: {
_id: '507f1f77bcf86cd799439011',
emailNormal: 'user@example.com',
name: '<string>',
groups: [{_id: '507f1f77bcf86cd799439011', name: '<string>'}]
},
status: '<string>',
reason: '<string>'
}
],
reason: '<string>',
graphicsTranslation: '507f1f77bcf86cd799439011',
translation: '507f1f77bcf86cd799439011',
tags: '<unknown>'
},
projects: [{_id: '507f1f77bcf86cd799439011', name: '<string>', slug: '<string>'}],
assets: [
{
_id: '507f1f77bcf86cd799439011',
name: '<string>',
project: '507f1f77bcf86cd799439011',
type: '<string>',
notifyUrl: 'https://example.com/path/to/object'
}
],
urls: {
view: 'https://example.com/path/to/object',
manage: 'https://example.com/path/to/object',
invite: 'https://example.com/path/to/object',
translate: 'https://example.com/path/to/object'
},
assetTypes: ['<string>']
},
type: '<string>',
title: '<string>',
emailSubject: '<string>',
read: true,
viewed: true,
sent: true,
added: 123,
created: 123,
$links: {self: '//example.com/path/to/object'}
})
};
fetch('https://api-staging.pixwel.com/api/notifications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.pixwel.com/api/notifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'_id' => '507f1f77bcf86cd799439011',
'from' => '507f1f77bcf86cd799439011',
'to' => '507f1f77bcf86cd799439011',
'event' => [
'_id' => '507f1f77bcf86cd799439011',
'processed' => true,
'pushed' => true,
'digested' => true,
'created' => 123,
'body' => '<string>',
'graphicsFile' => [
'id' => '<string>',
'url' => 'https://example.com/path/to/object',
'name' => '<string>',
'rootId' => '<string>',
'version' => 123
],
'graphicsComment' => [
'id' => '<string>',
'replyTo' => '<string>',
'body' => '<string>',
'user' => [
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'email' => 'user@example.com'
],
'created' => 123,
'fileId' => '<string>'
],
'notify' => [
'users' => [
'507f1f77bcf86cd799439011'
],
'groups' => [
'507f1f77bcf86cd799439011'
]
],
'from' => [
'_id' => '507f1f77bcf86cd799439011',
'status' => [
'invited' => true,
'approved' => true,
'registered' => true,
'confirmed' => true
],
'invite' => 'https://example.com/path/to/object',
'name' => '<string>',
'username' => 'user@example.com',
'emailNormal' => 'user@example.com'
],
'type' => '<string>',
'workRequest' => [
'_id' => '507f1f77bcf86cd799439011',
'auto' => true,
'autosubs' => true,
'dualLanguages' => true,
'aspectRatio' => '<string>',
'status' => '<string>',
'from' => '507f1f77bcf86cd799439011',
'asset' => '507f1f77bcf86cd799439011',
'assetType' => '<string>',
'assetCategory' => '<string>',
'due' => [
'date' => 123,
'tz' => '<string>'
],
'deliveryDeadline' => [
'date' => 123,
'tz' => '<string>'
],
'autoMode' => true,
'language' => '<string>',
'territory' => '<string>',
'dng' => [
'dialogue' => [
'<string>'
],
'graphics' => [
'<string>'
],
'narration' => [
'<string>'
]
],
'audioFile' => '<unknown>',
'instructions' => '<string>',
'urls' => [
'view' => 'https://example.com/path/to/object',
'manage' => 'https://example.com/path/to/object',
'invite' => 'https://example.com/path/to/object',
'translate' => 'https://example.com/path/to/object'
],
'files' => [
[
'name' => '<string>',
'files' => '<unknown>'
]
],
'uses' => [
'items' => [
'<string>'
],
'details' => [
]
],
'dcp' => [
'items' => [
'<string>'
],
'details' => [
]
],
'recipients' => [
],
'shippingAddresses' => [
],
'project' => '507f1f77bcf86cd799439011',
'studio' => '507f1f77bcf86cd799439011',
'estimate' => [
'base' => [
'graphics' => 123,
'narration' => 123,
'scripts' => 123,
'dubbing' => 123,
'subtitling' => 123,
'hybrid' => 123,
'encoding' => 123,
'autosubs' => 123,
'autogfx' => 123
],
'applied' => [
'graphics' => 123,
'narration' => 123,
'scripts' => 123,
'dubbing' => 123,
'subtitling' => 123,
'hybrid' => 123,
'encoding' => 123,
'autosubs' => 123,
'autogfx' => 123,
'files' => 123,
'total' => 123
]
],
'materials' => [
[
'name' => '<string>',
'complete' => true,
'approved' => true,
'files' => [
[
'id' => '<string>',
'url' => 'https://example.com/path/to/object',
'name' => '<string>',
'uploadedAt' => 123,
'rootId' => '<string>',
'version' => 123,
'isCurrentVersion' => true,
'previousVersionId' => '<unknown>'
]
],
'changeRequests' => [
[
'id' => '<string>',
'_id' => '<string>',
'_optimistic' => true,
'fileId' => '<string>',
'body' => '<string>',
'status' => '<string>',
'user' => [
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'email' => 'user@example.com'
],
'requestedBy' => [
'_id' => '507f1f77bcf86cd799439011',
'email' => 'user@example.com'
],
'requestedAt' => 123,
'created' => 123,
'replies' => [
[
'id' => '<string>',
'_id' => '<string>',
'_optimistic' => true,
'replyTo' => '<string>',
'body' => '<string>',
'user' => [
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'email' => 'user@example.com'
],
'created' => 123,
'editedAt' => 123
]
],
'editedAt' => 123
]
]
]
],
'rejections' => '<unknown>',
'history' => [
[
'date' => 123,
'user' => [
'_id' => '507f1f77bcf86cd799439011',
'emailNormal' => 'user@example.com',
'name' => '<string>',
'groups' => [
[
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>'
]
]
],
'status' => '<string>',
'reason' => '<string>'
]
],
'reason' => '<string>',
'graphicsTranslation' => '507f1f77bcf86cd799439011',
'translation' => '507f1f77bcf86cd799439011',
'tags' => '<unknown>'
],
'projects' => [
[
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'slug' => '<string>'
]
],
'assets' => [
[
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'project' => '507f1f77bcf86cd799439011',
'type' => '<string>',
'notifyUrl' => 'https://example.com/path/to/object'
]
],
'urls' => [
'view' => 'https://example.com/path/to/object',
'manage' => 'https://example.com/path/to/object',
'invite' => 'https://example.com/path/to/object',
'translate' => 'https://example.com/path/to/object'
],
'assetTypes' => [
'<string>'
]
],
'type' => '<string>',
'title' => '<string>',
'emailSubject' => '<string>',
'read' => true,
'viewed' => true,
'sent' => true,
'added' => 123,
'created' => 123,
'$links' => [
'self' => '//example.com/path/to/object'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-staging.pixwel.com/api/notifications"
payload := strings.NewReader("{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"from\": \"507f1f77bcf86cd799439011\",\n \"to\": \"507f1f77bcf86cd799439011\",\n \"event\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"processed\": true,\n \"pushed\": true,\n \"digested\": true,\n \"created\": 123,\n \"body\": \"<string>\",\n \"graphicsFile\": {\n \"id\": \"<string>\",\n \"url\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"rootId\": \"<string>\",\n \"version\": 123\n },\n \"graphicsComment\": {\n \"id\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"body\": \"<string>\",\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"email\": \"user@example.com\"\n },\n \"created\": 123,\n \"fileId\": \"<string>\"\n },\n \"notify\": {\n \"users\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"groups\": [\n \"507f1f77bcf86cd799439011\"\n ]\n },\n \"from\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"status\": {\n \"invited\": true,\n \"approved\": true,\n \"registered\": true,\n \"confirmed\": true\n },\n \"invite\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"username\": \"user@example.com\",\n \"emailNormal\": \"user@example.com\"\n },\n \"type\": \"<string>\",\n \"workRequest\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"auto\": true,\n \"autosubs\": true,\n \"dualLanguages\": true,\n \"aspectRatio\": \"<string>\",\n \"status\": \"<string>\",\n \"from\": \"507f1f77bcf86cd799439011\",\n \"asset\": \"507f1f77bcf86cd799439011\",\n \"assetType\": \"<string>\",\n \"assetCategory\": \"<string>\",\n \"due\": {\n \"date\": 123,\n \"tz\": \"<string>\"\n },\n \"deliveryDeadline\": {\n \"date\": 123,\n \"tz\": \"<string>\"\n },\n \"autoMode\": true,\n \"language\": \"<string>\",\n \"territory\": \"<string>\",\n \"dng\": {\n \"dialogue\": [\n \"<string>\"\n ],\n \"graphics\": [\n \"<string>\"\n ],\n \"narration\": [\n \"<string>\"\n ]\n },\n \"audioFile\": \"<unknown>\",\n \"instructions\": \"<string>\",\n \"urls\": {\n \"view\": \"https://example.com/path/to/object\",\n \"manage\": \"https://example.com/path/to/object\",\n \"invite\": \"https://example.com/path/to/object\",\n \"translate\": \"https://example.com/path/to/object\"\n },\n \"files\": [\n {\n \"name\": \"<string>\",\n \"files\": \"<unknown>\"\n }\n ],\n \"uses\": {\n \"items\": [\n \"<string>\"\n ],\n \"details\": {}\n },\n \"dcp\": {\n \"items\": [\n \"<string>\"\n ],\n \"details\": {}\n },\n \"recipients\": {},\n \"shippingAddresses\": {},\n \"project\": \"507f1f77bcf86cd799439011\",\n \"studio\": \"507f1f77bcf86cd799439011\",\n \"estimate\": {\n \"base\": {\n \"graphics\": 123,\n \"narration\": 123,\n \"scripts\": 123,\n \"dubbing\": 123,\n \"subtitling\": 123,\n \"hybrid\": 123,\n \"encoding\": 123,\n \"autosubs\": 123,\n \"autogfx\": 123\n },\n \"applied\": {\n \"graphics\": 123,\n \"narration\": 123,\n \"scripts\": 123,\n \"dubbing\": 123,\n \"subtitling\": 123,\n \"hybrid\": 123,\n \"encoding\": 123,\n \"autosubs\": 123,\n \"autogfx\": 123,\n \"files\": 123,\n \"total\": 123\n }\n },\n \"materials\": [\n {\n \"name\": \"<string>\",\n \"complete\": true,\n \"approved\": true,\n \"files\": [\n {\n \"id\": \"<string>\",\n \"url\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"uploadedAt\": 123,\n \"rootId\": \"<string>\",\n \"version\": 123,\n \"isCurrentVersion\": true,\n \"previousVersionId\": \"<unknown>\"\n }\n ],\n \"changeRequests\": [\n {\n \"id\": \"<string>\",\n \"_id\": \"<string>\",\n \"_optimistic\": true,\n \"fileId\": \"<string>\",\n \"body\": \"<string>\",\n \"status\": \"<string>\",\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"email\": \"user@example.com\"\n },\n \"requestedBy\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"email\": \"user@example.com\"\n },\n \"requestedAt\": 123,\n \"created\": 123,\n \"replies\": [\n {\n \"id\": \"<string>\",\n \"_id\": \"<string>\",\n \"_optimistic\": true,\n \"replyTo\": \"<string>\",\n \"body\": \"<string>\",\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"email\": \"user@example.com\"\n },\n \"created\": 123,\n \"editedAt\": 123\n }\n ],\n \"editedAt\": 123\n }\n ]\n }\n ],\n \"rejections\": \"<unknown>\",\n \"history\": [\n {\n \"date\": 123,\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"emailNormal\": \"user@example.com\",\n \"name\": \"<string>\",\n \"groups\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\"\n }\n ]\n },\n \"status\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ],\n \"reason\": \"<string>\",\n \"graphicsTranslation\": \"507f1f77bcf86cd799439011\",\n \"translation\": \"507f1f77bcf86cd799439011\",\n \"tags\": \"<unknown>\"\n },\n \"projects\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\"\n }\n ],\n \"assets\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"project\": \"507f1f77bcf86cd799439011\",\n \"type\": \"<string>\",\n \"notifyUrl\": \"https://example.com/path/to/object\"\n }\n ],\n \"urls\": {\n \"view\": \"https://example.com/path/to/object\",\n \"manage\": \"https://example.com/path/to/object\",\n \"invite\": \"https://example.com/path/to/object\",\n \"translate\": \"https://example.com/path/to/object\"\n },\n \"assetTypes\": [\n \"<string>\"\n ]\n },\n \"type\": \"<string>\",\n \"title\": \"<string>\",\n \"emailSubject\": \"<string>\",\n \"read\": true,\n \"viewed\": true,\n \"sent\": true,\n \"added\": 123,\n \"created\": 123,\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api-staging.pixwel.com/api/notifications")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"from\": \"507f1f77bcf86cd799439011\",\n \"to\": \"507f1f77bcf86cd799439011\",\n \"event\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"processed\": true,\n \"pushed\": true,\n \"digested\": true,\n \"created\": 123,\n \"body\": \"<string>\",\n \"graphicsFile\": {\n \"id\": \"<string>\",\n \"url\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"rootId\": \"<string>\",\n \"version\": 123\n },\n \"graphicsComment\": {\n \"id\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"body\": \"<string>\",\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"email\": \"user@example.com\"\n },\n \"created\": 123,\n \"fileId\": \"<string>\"\n },\n \"notify\": {\n \"users\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"groups\": [\n \"507f1f77bcf86cd799439011\"\n ]\n },\n \"from\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"status\": {\n \"invited\": true,\n \"approved\": true,\n \"registered\": true,\n \"confirmed\": true\n },\n \"invite\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"username\": \"user@example.com\",\n \"emailNormal\": \"user@example.com\"\n },\n \"type\": \"<string>\",\n \"workRequest\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"auto\": true,\n \"autosubs\": true,\n \"dualLanguages\": true,\n \"aspectRatio\": \"<string>\",\n \"status\": \"<string>\",\n \"from\": \"507f1f77bcf86cd799439011\",\n \"asset\": \"507f1f77bcf86cd799439011\",\n \"assetType\": \"<string>\",\n \"assetCategory\": \"<string>\",\n \"due\": {\n \"date\": 123,\n \"tz\": \"<string>\"\n },\n \"deliveryDeadline\": {\n \"date\": 123,\n \"tz\": \"<string>\"\n },\n \"autoMode\": true,\n \"language\": \"<string>\",\n \"territory\": \"<string>\",\n \"dng\": {\n \"dialogue\": [\n \"<string>\"\n ],\n \"graphics\": [\n \"<string>\"\n ],\n \"narration\": [\n \"<string>\"\n ]\n },\n \"audioFile\": \"<unknown>\",\n \"instructions\": \"<string>\",\n \"urls\": {\n \"view\": \"https://example.com/path/to/object\",\n \"manage\": \"https://example.com/path/to/object\",\n \"invite\": \"https://example.com/path/to/object\",\n \"translate\": \"https://example.com/path/to/object\"\n },\n \"files\": [\n {\n \"name\": \"<string>\",\n \"files\": \"<unknown>\"\n }\n ],\n \"uses\": {\n \"items\": [\n \"<string>\"\n ],\n \"details\": {}\n },\n \"dcp\": {\n \"items\": [\n \"<string>\"\n ],\n \"details\": {}\n },\n \"recipients\": {},\n \"shippingAddresses\": {},\n \"project\": \"507f1f77bcf86cd799439011\",\n \"studio\": \"507f1f77bcf86cd799439011\",\n \"estimate\": {\n \"base\": {\n \"graphics\": 123,\n \"narration\": 123,\n \"scripts\": 123,\n \"dubbing\": 123,\n \"subtitling\": 123,\n \"hybrid\": 123,\n \"encoding\": 123,\n \"autosubs\": 123,\n \"autogfx\": 123\n },\n \"applied\": {\n \"graphics\": 123,\n \"narration\": 123,\n \"scripts\": 123,\n \"dubbing\": 123,\n \"subtitling\": 123,\n \"hybrid\": 123,\n \"encoding\": 123,\n \"autosubs\": 123,\n \"autogfx\": 123,\n \"files\": 123,\n \"total\": 123\n }\n },\n \"materials\": [\n {\n \"name\": \"<string>\",\n \"complete\": true,\n \"approved\": true,\n \"files\": [\n {\n \"id\": \"<string>\",\n \"url\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"uploadedAt\": 123,\n \"rootId\": \"<string>\",\n \"version\": 123,\n \"isCurrentVersion\": true,\n \"previousVersionId\": \"<unknown>\"\n }\n ],\n \"changeRequests\": [\n {\n \"id\": \"<string>\",\n \"_id\": \"<string>\",\n \"_optimistic\": true,\n \"fileId\": \"<string>\",\n \"body\": \"<string>\",\n \"status\": \"<string>\",\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"email\": \"user@example.com\"\n },\n \"requestedBy\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"email\": \"user@example.com\"\n },\n \"requestedAt\": 123,\n \"created\": 123,\n \"replies\": [\n {\n \"id\": \"<string>\",\n \"_id\": \"<string>\",\n \"_optimistic\": true,\n \"replyTo\": \"<string>\",\n \"body\": \"<string>\",\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"email\": \"user@example.com\"\n },\n \"created\": 123,\n \"editedAt\": 123\n }\n ],\n \"editedAt\": 123\n }\n ]\n }\n ],\n \"rejections\": \"<unknown>\",\n \"history\": [\n {\n \"date\": 123,\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"emailNormal\": \"user@example.com\",\n \"name\": \"<string>\",\n \"groups\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\"\n }\n ]\n },\n \"status\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ],\n \"reason\": \"<string>\",\n \"graphicsTranslation\": \"507f1f77bcf86cd799439011\",\n \"translation\": \"507f1f77bcf86cd799439011\",\n \"tags\": \"<unknown>\"\n },\n \"projects\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\"\n }\n ],\n \"assets\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"project\": \"507f1f77bcf86cd799439011\",\n \"type\": \"<string>\",\n \"notifyUrl\": \"https://example.com/path/to/object\"\n }\n ],\n \"urls\": {\n \"view\": \"https://example.com/path/to/object\",\n \"manage\": \"https://example.com/path/to/object\",\n \"invite\": \"https://example.com/path/to/object\",\n \"translate\": \"https://example.com/path/to/object\"\n },\n \"assetTypes\": [\n \"<string>\"\n ]\n },\n \"type\": \"<string>\",\n \"title\": \"<string>\",\n \"emailSubject\": \"<string>\",\n \"read\": true,\n \"viewed\": true,\n \"sent\": true,\n \"added\": 123,\n \"created\": 123,\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.pixwel.com/api/notifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"from\": \"507f1f77bcf86cd799439011\",\n \"to\": \"507f1f77bcf86cd799439011\",\n \"event\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"processed\": true,\n \"pushed\": true,\n \"digested\": true,\n \"created\": 123,\n \"body\": \"<string>\",\n \"graphicsFile\": {\n \"id\": \"<string>\",\n \"url\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"rootId\": \"<string>\",\n \"version\": 123\n },\n \"graphicsComment\": {\n \"id\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"body\": \"<string>\",\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"email\": \"user@example.com\"\n },\n \"created\": 123,\n \"fileId\": \"<string>\"\n },\n \"notify\": {\n \"users\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"groups\": [\n \"507f1f77bcf86cd799439011\"\n ]\n },\n \"from\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"status\": {\n \"invited\": true,\n \"approved\": true,\n \"registered\": true,\n \"confirmed\": true\n },\n \"invite\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"username\": \"user@example.com\",\n \"emailNormal\": \"user@example.com\"\n },\n \"type\": \"<string>\",\n \"workRequest\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"auto\": true,\n \"autosubs\": true,\n \"dualLanguages\": true,\n \"aspectRatio\": \"<string>\",\n \"status\": \"<string>\",\n \"from\": \"507f1f77bcf86cd799439011\",\n \"asset\": \"507f1f77bcf86cd799439011\",\n \"assetType\": \"<string>\",\n \"assetCategory\": \"<string>\",\n \"due\": {\n \"date\": 123,\n \"tz\": \"<string>\"\n },\n \"deliveryDeadline\": {\n \"date\": 123,\n \"tz\": \"<string>\"\n },\n \"autoMode\": true,\n \"language\": \"<string>\",\n \"territory\": \"<string>\",\n \"dng\": {\n \"dialogue\": [\n \"<string>\"\n ],\n \"graphics\": [\n \"<string>\"\n ],\n \"narration\": [\n \"<string>\"\n ]\n },\n \"audioFile\": \"<unknown>\",\n \"instructions\": \"<string>\",\n \"urls\": {\n \"view\": \"https://example.com/path/to/object\",\n \"manage\": \"https://example.com/path/to/object\",\n \"invite\": \"https://example.com/path/to/object\",\n \"translate\": \"https://example.com/path/to/object\"\n },\n \"files\": [\n {\n \"name\": \"<string>\",\n \"files\": \"<unknown>\"\n }\n ],\n \"uses\": {\n \"items\": [\n \"<string>\"\n ],\n \"details\": {}\n },\n \"dcp\": {\n \"items\": [\n \"<string>\"\n ],\n \"details\": {}\n },\n \"recipients\": {},\n \"shippingAddresses\": {},\n \"project\": \"507f1f77bcf86cd799439011\",\n \"studio\": \"507f1f77bcf86cd799439011\",\n \"estimate\": {\n \"base\": {\n \"graphics\": 123,\n \"narration\": 123,\n \"scripts\": 123,\n \"dubbing\": 123,\n \"subtitling\": 123,\n \"hybrid\": 123,\n \"encoding\": 123,\n \"autosubs\": 123,\n \"autogfx\": 123\n },\n \"applied\": {\n \"graphics\": 123,\n \"narration\": 123,\n \"scripts\": 123,\n \"dubbing\": 123,\n \"subtitling\": 123,\n \"hybrid\": 123,\n \"encoding\": 123,\n \"autosubs\": 123,\n \"autogfx\": 123,\n \"files\": 123,\n \"total\": 123\n }\n },\n \"materials\": [\n {\n \"name\": \"<string>\",\n \"complete\": true,\n \"approved\": true,\n \"files\": [\n {\n \"id\": \"<string>\",\n \"url\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"uploadedAt\": 123,\n \"rootId\": \"<string>\",\n \"version\": 123,\n \"isCurrentVersion\": true,\n \"previousVersionId\": \"<unknown>\"\n }\n ],\n \"changeRequests\": [\n {\n \"id\": \"<string>\",\n \"_id\": \"<string>\",\n \"_optimistic\": true,\n \"fileId\": \"<string>\",\n \"body\": \"<string>\",\n \"status\": \"<string>\",\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"email\": \"user@example.com\"\n },\n \"requestedBy\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"email\": \"user@example.com\"\n },\n \"requestedAt\": 123,\n \"created\": 123,\n \"replies\": [\n {\n \"id\": \"<string>\",\n \"_id\": \"<string>\",\n \"_optimistic\": true,\n \"replyTo\": \"<string>\",\n \"body\": \"<string>\",\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"email\": \"user@example.com\"\n },\n \"created\": 123,\n \"editedAt\": 123\n }\n ],\n \"editedAt\": 123\n }\n ]\n }\n ],\n \"rejections\": \"<unknown>\",\n \"history\": [\n {\n \"date\": 123,\n \"user\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"emailNormal\": \"user@example.com\",\n \"name\": \"<string>\",\n \"groups\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\"\n }\n ]\n },\n \"status\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ],\n \"reason\": \"<string>\",\n \"graphicsTranslation\": \"507f1f77bcf86cd799439011\",\n \"translation\": \"507f1f77bcf86cd799439011\",\n \"tags\": \"<unknown>\"\n },\n \"projects\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\"\n }\n ],\n \"assets\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"project\": \"507f1f77bcf86cd799439011\",\n \"type\": \"<string>\",\n \"notifyUrl\": \"https://example.com/path/to/object\"\n }\n ],\n \"urls\": {\n \"view\": \"https://example.com/path/to/object\",\n \"manage\": \"https://example.com/path/to/object\",\n \"invite\": \"https://example.com/path/to/object\",\n \"translate\": \"https://example.com/path/to/object\"\n },\n \"assetTypes\": [\n \"<string>\"\n ]\n },\n \"type\": \"<string>\",\n \"title\": \"<string>\",\n \"emailSubject\": \"<string>\",\n \"read\": true,\n \"viewed\": true,\n \"sent\": true,\n \"added\": 123,\n \"created\": 123,\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n}"
response = http.request(request)
puts response.read_body{
"_id": "507f1f77bcf86cd799439011",
"from": "507f1f77bcf86cd799439011",
"to": "507f1f77bcf86cd799439011",
"event": {
"_id": "507f1f77bcf86cd799439011",
"processed": true,
"pushed": true,
"digested": true,
"created": 123,
"body": "<string>",
"graphicsFile": {
"id": "<string>",
"url": "https://example.com/path/to/object",
"name": "<string>",
"rootId": "<string>",
"version": 123
},
"graphicsComment": {
"id": "<string>",
"replyTo": "<string>",
"body": "<string>",
"user": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"email": "user@example.com"
},
"created": 123,
"fileId": "<string>"
},
"notify": {
"users": [
"507f1f77bcf86cd799439011"
],
"groups": [
"507f1f77bcf86cd799439011"
]
},
"from": {
"_id": "507f1f77bcf86cd799439011",
"status": {
"invited": true,
"approved": true,
"registered": true,
"confirmed": true
},
"invite": "https://example.com/path/to/object",
"name": "<string>",
"username": "user@example.com",
"emailNormal": "user@example.com"
},
"type": "<string>",
"workRequest": {
"_id": "507f1f77bcf86cd799439011",
"auto": true,
"autosubs": true,
"dualLanguages": true,
"aspectRatio": "<string>",
"status": "<string>",
"from": "507f1f77bcf86cd799439011",
"asset": "507f1f77bcf86cd799439011",
"assetType": "<string>",
"assetCategory": "<string>",
"due": {
"date": 123,
"tz": "<string>"
},
"deliveryDeadline": {
"date": 123,
"tz": "<string>"
},
"autoMode": true,
"language": "<string>",
"territory": "<string>",
"dng": {
"dialogue": [
"<string>"
],
"graphics": [
"<string>"
],
"narration": [
"<string>"
]
},
"audioFile": "<unknown>",
"instructions": "<string>",
"urls": {
"view": "https://example.com/path/to/object",
"manage": "https://example.com/path/to/object",
"invite": "https://example.com/path/to/object",
"translate": "https://example.com/path/to/object"
},
"files": [
{
"name": "<string>",
"files": "<unknown>"
}
],
"uses": {
"items": [
"<string>"
],
"details": {}
},
"dcp": {
"items": [
"<string>"
],
"details": {}
},
"recipients": {},
"shippingAddresses": {},
"project": "507f1f77bcf86cd799439011",
"studio": "507f1f77bcf86cd799439011",
"estimate": {
"base": {
"graphics": 123,
"narration": 123,
"scripts": 123,
"dubbing": 123,
"subtitling": 123,
"hybrid": 123,
"encoding": 123,
"autosubs": 123,
"autogfx": 123
},
"applied": {
"graphics": 123,
"narration": 123,
"scripts": 123,
"dubbing": 123,
"subtitling": 123,
"hybrid": 123,
"encoding": 123,
"autosubs": 123,
"autogfx": 123,
"files": 123,
"total": 123
}
},
"materials": [
{
"name": "<string>",
"complete": true,
"approved": true,
"files": [
{
"id": "<string>",
"url": "https://example.com/path/to/object",
"name": "<string>",
"uploadedAt": 123,
"rootId": "<string>",
"version": 123,
"isCurrentVersion": true,
"previousVersionId": "<unknown>"
}
],
"changeRequests": [
{
"id": "<string>",
"_id": "<string>",
"_optimistic": true,
"fileId": "<string>",
"body": "<string>",
"status": "<string>",
"user": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"email": "user@example.com"
},
"requestedBy": {
"_id": "507f1f77bcf86cd799439011",
"email": "user@example.com"
},
"requestedAt": 123,
"created": 123,
"replies": [
{
"id": "<string>",
"_id": "<string>",
"_optimistic": true,
"replyTo": "<string>",
"body": "<string>",
"user": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"email": "user@example.com"
},
"created": 123,
"editedAt": 123
}
],
"editedAt": 123
}
]
}
],
"rejections": "<unknown>",
"history": [
{
"date": 123,
"user": {
"_id": "507f1f77bcf86cd799439011",
"emailNormal": "user@example.com",
"name": "<string>",
"groups": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>"
}
]
},
"status": "<string>",
"reason": "<string>"
}
],
"reason": "<string>",
"graphicsTranslation": "507f1f77bcf86cd799439011",
"translation": "507f1f77bcf86cd799439011",
"tags": "<unknown>"
},
"projects": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"slug": "<string>"
}
],
"assets": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"project": "507f1f77bcf86cd799439011",
"type": "<string>",
"notifyUrl": "https://example.com/path/to/object"
}
],
"urls": {
"view": "https://example.com/path/to/object",
"manage": "https://example.com/path/to/object",
"invite": "https://example.com/path/to/object",
"translate": "https://example.com/path/to/object"
},
"assetTypes": [
"<string>"
]
},
"type": "<string>",
"title": "<string>",
"emailSubject": "<string>",
"read": true,
"viewed": true,
"sent": true,
"added": 123,
"created": 123,
"$links": {
"self": "//example.com/path/to/object"
}
}Authorizations
BasicAuthBearerAuth
Email address and password. A personal access token (pat_…) or session token (token-…) may also be sent in the password field, with any non-empty value as the username — a blank username short-circuits to a 401 before the token is read.
Body
application/json
Example:
"507f1f77bcf86cd799439011"
Example:
"507f1f77bcf86cd799439011"
Example:
"507f1f77bcf86cd799439011"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
OK
Example:
"507f1f77bcf86cd799439011"
Example:
"507f1f77bcf86cd799439011"
Example:
"507f1f77bcf86cd799439011"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I