Prepara il caricamento di un file
curl --request POST \
--url https://businessinsider.squaddcrm.com/api/v1/files/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"size": 26214400,
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
size: 26214400,
parentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://businessinsider.squaddcrm.com/api/v1/files/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://businessinsider.squaddcrm.com/api/v1/files/uploads"
payload = {
"name": "<string>",
"size": 26214400,
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"uploadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"uploadUrl": "<string>",
"method": "PUT",
"tusEndpoint": "<string>",
"token": "<string>",
"objectName": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}File
Prepara il caricamento di un file
Rende un indirizzo firmato (vale 2 ore): si manda il file intero con PUT uploadUrl (Content-Type del file), oppure a pezzi col protocollo tus su tusEndpoint con x-signature: token. Poi POST /files/uploads/{id}/complete. PDF, Word (.docx), testo e Markdown, fino a 50 MB.
POST
/
files
/
uploads
Prepara il caricamento di un file
curl --request POST \
--url https://businessinsider.squaddcrm.com/api/v1/files/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"size": 26214400,
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
size: 26214400,
parentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://businessinsider.squaddcrm.com/api/v1/files/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://businessinsider.squaddcrm.com/api/v1/files/uploads"
payload = {
"name": "<string>",
"size": 26214400,
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"uploadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"uploadUrl": "<string>",
"method": "PUT",
"tusEndpoint": "<string>",
"token": "<string>",
"objectName": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}Authorizations
Headers
Body
application/json
Response
Il caricamento preparato.